refactor(swarm-authelia): name the collector option in full at the gate
There are two otel options one word apart: swarm.otel is the swarm's collector, hyperhive.otel is the per-hive tier that ships upstream and never reads scrapeTargets. The gate went through a let binding declared 800 lines from its use, so which one it referred to was not visible where it mattered — mara had to ask. Gating the wrong one is not a build error. It is a target that is either always declared or never declared, and both look like working config.
This commit is contained in:
parent
541dd29820
commit
8178b0b55c
1 changed files with 7 additions and 2 deletions
|
|
@ -43,7 +43,6 @@ let
|
|||
swarmDomain = hyperhiveCfg.swarm.domain;
|
||||
uiCfg = hyperhiveCfg.swarm.ui;
|
||||
forgeCfg = hyperhiveCfg.swarm.forge;
|
||||
otelCfg = hyperhiveCfg.swarm.otel;
|
||||
|
||||
# Group an account must hold to reach operator-only surfaces. Named
|
||||
# here because this module writes the rule that enforces it and
|
||||
|
|
@ -851,7 +850,13 @@ in
|
|||
# endpoint published under a name with a cert and an audience, which is a
|
||||
# different piece of work. This only stops the config asserting a
|
||||
# collection that is not happening.
|
||||
services.hyperhive.swarm.otel.scrapeTargets = lib.mkIf otelCfg.enable {
|
||||
# ⚠️ `swarm.otel` and not `hyperhive.otel` — two different collectors one
|
||||
# word apart. This one is the swarm's; `hyperhive.otel` is the per-hive
|
||||
# tier that ships telemetry upstream and never reads `scrapeTargets`.
|
||||
# Written out in full rather than through a `let` binding so the gate and
|
||||
# the option it gates are visibly the same path: gating the wrong one is
|
||||
# not a build error, it is a target that is always declared or never is.
|
||||
services.hyperhive.swarm.otel.scrapeTargets = lib.mkIf config.services.hyperhive.swarm.otel.enable {
|
||||
authelia = "127.0.0.1:${toString cfg.metricsPort}";
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue