glue-controller-env: the controller always exports otlp to the swarm's collector
This commit is contained in:
parent
ed76419be7
commit
2507f4f713
3 changed files with 45 additions and 17 deletions
|
|
@ -58,6 +58,14 @@ let
|
|||
otel.debug = true;
|
||||
};
|
||||
|
||||
# The controller behind a gateway on a non-default TLS port: the only
|
||||
# fixture whose collector URL carries a port. Only the controller's
|
||||
# environment is read off it.
|
||||
controllerAltPort = hive {
|
||||
deploy.swarm-controller.enable = true;
|
||||
gateway.httpsPort = 8443;
|
||||
};
|
||||
|
||||
# On the store's host, which mints the runner's store identity.
|
||||
withCi = hive {
|
||||
deploy.bao.enable = true;
|
||||
|
|
@ -149,10 +157,11 @@ let
|
|||
ok = allLocal.services.hyperhive.deploy.swarm-controller.enable;
|
||||
}
|
||||
{
|
||||
# ../host-modules/glue-controller-env.nix: the collector's coordinates
|
||||
# follow swarm-otel running HERE. `controllerAlone` is the split case — a
|
||||
# controller whose collector runs elsewhere.
|
||||
name = "the controller exports to the collector only where the collector runs here";
|
||||
# ../host-modules/glue-controller-env.nix: the controller always exports to
|
||||
# the swarm's collector. `controllerAlone` runs no collector of its own
|
||||
# (`allLocal` does, as the presence control); `centralToggleOff` has no
|
||||
# controller, so no unit to set it on.
|
||||
name = "the controller always exports to the swarm's collector";
|
||||
ok =
|
||||
let
|
||||
env = m: m.systemd.services.swarm-controller.environment;
|
||||
|
|
@ -169,8 +178,16 @@ let
|
|||
&& client != null
|
||||
&& lib.elem clientId client.audience
|
||||
&& client.accessTokenSignedResponseAlg == "RS256"
|
||||
&& !(env shared.controllerAlone ? OTEL_EXPORTER_OTLP_ENDPOINT)
|
||||
&& !(env shared.controllerAlone ? SWARM_CONTROLLER_OTEL_AUDIENCE);
|
||||
&& allLocal.services.hyperhive.deploy.swarm-otel.enable
|
||||
&& !shared.controllerAlone.services.hyperhive.deploy.swarm-otel.enable
|
||||
&&
|
||||
(env shared.controllerAlone).OTEL_EXPORTER_OTLP_ENDPOINT or null
|
||||
== "https://${otel.domain}/${otel.producerName}"
|
||||
&& (env shared.controllerAlone).SWARM_CONTROLLER_OTEL_AUDIENCE or null == clientId
|
||||
&&
|
||||
(env controllerAltPort).OTEL_EXPORTER_OTLP_ENDPOINT or null
|
||||
== "https://${otel.domain}:8443/${otel.producerName}"
|
||||
&& !(centralToggleOff.systemd.services ? swarm-controller);
|
||||
}
|
||||
{
|
||||
# Same file: `swarmctl` is told where the configured authelia is only
|
||||
|
|
|
|||
Loading…
Reference in a new issue