service urls carry no gateway port, httpsPort is listen-only
This commit is contained in:
parent
4d9b7e0ca9
commit
19680a8b78
25 changed files with 105 additions and 143 deletions
|
|
@ -24,8 +24,7 @@
|
|||
# ./glue-swarm-otel-oidc-client.nix), and `deploy.swarm-otel.enable` only says it
|
||||
# runs HERE. The endpoint is its swarm-service name through the gateway, never a
|
||||
# loopback literal, with no trailing slash: the http exporter appends
|
||||
# `/v1/metrics` and the gateway route strips `/${producerName}`. The port suffix
|
||||
# is elided on 443, as in ./swarm-bao.nix.
|
||||
# `/v1/metrics` and the gateway route strips `/${producerName}`.
|
||||
# `SWARM_CONTROLLER_OTEL_AUDIENCE` is the audience ./glue-controller-oidc-client.nix
|
||||
# registers and ./swarm-otel.nix's `oidc/${producerName}` authenticator checks.
|
||||
{
|
||||
|
|
@ -38,9 +37,6 @@ let
|
|||
deployCfg = hyperhiveCfg.deploy;
|
||||
otelSwarmCfg = hyperhiveCfg.swarm.otel;
|
||||
queueClientId = hyperhiveCfg.swarm.controller.queueClientId;
|
||||
gatewayPortSuffix = lib.optionalString (
|
||||
hyperhiveCfg.gateway.httpsPort != 443
|
||||
) ":${toString hyperhiveCfg.gateway.httpsPort}";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf deployCfg.swarm-controller.enable (
|
||||
|
|
@ -53,7 +49,7 @@ in
|
|||
})
|
||||
{
|
||||
systemd.services.swarm-controller.environment = {
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT = "https://${otelSwarmCfg.domain}${gatewayPortSuffix}/${otelSwarmCfg.producerName}";
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT = "https://${otelSwarmCfg.domain}/${otelSwarmCfg.producerName}";
|
||||
SWARM_CONTROLLER_OTEL_AUDIENCE = queueClientId;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue