Watch
0
0
Fork
You've already forked hyperhive
0

ship the cache's init units' journal from a host with no collector, with the cache's own client

This commit is contained in:
maia 2026-11-18 03:38:07 +01:00 • committed by mara
commit a3682a5e9a

View file

@ -7,6 +7,11 @@
# nested inside the host's, and reading the host side back from in here
# recurses.
#
# One host imports it too: a host with neither the hive collector nor the swarm
# collector, whose own units would ship nowhere (./swarm-attic.nix). There the
# options sit beside the host's own, `units` names what to ship, and the
# journal is the host's.
#
# The client secret is fetched inside the container, under the container's own
# store identity, by `swarm-journal-forwarder-oidc`. That needs the container to
# reach the store, authelia and the swarm collector by name: the container needs
@ -64,6 +69,19 @@ in
'';
};
units = lib.mkOption {
type = lib.types.nullOr (lib.types.nonEmptyListOf lib.types.str);
default = null;
example = [ "swarm-bao-attic-tokens.service" ];
description = ''
Only these systemd units' entries are shipped. Null ships the whole
journal, which is right in a container that holds one service. Set it
when the module runs on a host, which holds everyone's units and may
be someone's workstation too. The list is never empty: a journald
receiver with no `units` reads every unit, not none.
'';
};
endpoint = lib.mkOption {
type = lib.types.str;
example = "https://otel.swarm.example/swarm-nats";
@ -226,7 +244,8 @@ in
# entry for the current boot crash-loops the receiver.
merge = true;
storage = "file_storage";
};
}
// lib.optionalAttrs (cfg.units != null) { inherit (cfg) units; };
processors.resource.attributes = [
{