nix: split swarm-otel into service and deploy-mode files
`swarm.otel` (what the swarm collector is to every hive: its domain, receiver ports, producer names, client id and the audiences that client may present) moves to nix/host-modules/swarm-otel-service.nix, together with the `journaldUnits` removal module and the helpers its defaults read. Everything else -- the `deploy.swarm-otel` options, the whole `config` block including `containers.swarm-otel`, and the helpers only they read -- stays in nix/host-modules/swarm-otel.nix, which default.nix now imports after the new file. The service file needs `domainBase` (for `domain`), `baoCfg` (for `storeProducerName`) and `cfg` plus `pushAudiences` (for `audience`). `swarmDomain` and `domainBase` move. `cfg`, `hyperhiveCfg`, `baoCfg`, `vmCfg`, `vlCfg`, `metricsPushUrl`, `logsPushUrl` and `pushAudiences` are read on both sides and none is an option, so each is bound in both files; the comments on the push URLs say the two copies must agree. `swarmCfg` was bound and never read, so neither file carries it. A pure move: option paths, option definitions and config are unchanged. Comments changed: the transition comment above `deploy.swarm-otel` now names the file `swarm.otel` lives in, and the push-URL and `pushAudiences` comments now describe the per-file readers and the duplicate. Three otel fixtures evaluate to the same host and container toplevel derivations, `swarm.otel.*` and `deploy.swarm-otel.*` values before and after. Refs #3742
This commit is contained in:
parent
fc8b8fa2f5
commit
3a0a7346b1
3 changed files with 345 additions and 316 deletions
|
|
@ -52,6 +52,7 @@
|
|||
./swarm-controller.nix
|
||||
./swarm-grafana-service.nix
|
||||
./swarm-grafana.nix
|
||||
./swarm-otel-service.nix
|
||||
./swarm-otel.nix
|
||||
./swarm-snapshot-store.nix
|
||||
./swarm-ui.nix
|
||||
|
|
|
|||
Loading…
Reference in a new issue