move links, adminSync.ignoreUsers and scrapeTargets under their service's deploy namespace
This commit is contained in:
parent
ee591b0546
commit
90272ec3c0
1 changed files with 156 additions and 108 deletions
|
|
@ -1594,6 +1594,15 @@ let
|
|||
victorialogs.port = 19428;
|
||||
forge.httpPort = 13000;
|
||||
matrix.allowEncryption = true;
|
||||
controller.links = [
|
||||
{
|
||||
label = "Legacy";
|
||||
icon = "L";
|
||||
url = "https://legacy.example/";
|
||||
}
|
||||
];
|
||||
matrix.adminSync.ignoreUsers = [ "@legacy:t.local" ];
|
||||
otel.scrapeTargets.legacy = "127.0.0.1:9777";
|
||||
};
|
||||
};
|
||||
d = old.services.hyperhive.deploy;
|
||||
|
|
@ -1623,6 +1632,19 @@ let
|
|||
&& d.forgejo.httpPort == 13000
|
||||
&& d.matrix.allowEncryption
|
||||
&& d.builder.nixpkgsFlake == "path:/legacy/nixpkgs"
|
||||
&& lib.any (l: l.label == "Legacy" && l.url == "https://legacy.example/") d.swarm-controller.links
|
||||
&& lib.any (l: l.label == "Legacy") (
|
||||
builtins.fromJSON old.systemd.services.swarm-controller.environment.SWARM_CONTROLLER_LINKS
|
||||
)
|
||||
&& d.swarm-controller.matrixAdminSync.ignoreUsers == [ "@legacy:t.local" ]
|
||||
&&
|
||||
old.systemd.services.swarm-controller.environment.SWARM_CONTROLLER_MATRIX_ADMIN_SYNC_IGNORE_USERS
|
||||
== "@legacy:t.local"
|
||||
&& d.swarm-otel.scrapeTargets.legacy == "127.0.0.1:9777"
|
||||
&&
|
||||
(lib.findFirst (j: j.job_name == "legacy") null (
|
||||
(otelSettings old).receivers.prometheus.config.scrape_configs
|
||||
)).static_configs == [ { targets = [ "127.0.0.1:9777" ]; } ]
|
||||
&&
|
||||
old.containers.swarm-builder.config.systemd.services.swarm-builder.environment.SWARM_BUILDER_NIXPKGS_FLAKE
|
||||
== "path:/legacy/nixpkgs"
|
||||
|
|
@ -1642,6 +1664,9 @@ let
|
|||
"swarm.forge.httpPort"
|
||||
"swarm.matrix.allowEncryption"
|
||||
"c0re.nixpkgsFlake"
|
||||
"swarm.controller.links"
|
||||
"swarm.matrix.adminSync.ignoreUsers"
|
||||
"swarm.otel.scrapeTargets"
|
||||
]
|
||||
&& !(lib.any (w: lib.hasInfix "swarm.controller.queue" w) allLocal.warnings)
|
||||
&& refused old "deploy.nats.otel.telemetryPort"
|
||||
|
|
@ -1672,7 +1697,15 @@ let
|
|||
&& (locs h.swarm.nats.domain)."= /metrics".proxyPass == "http://127.0.0.1:7777/metrics"
|
||||
&& (locs h.swarm.victorialogs.domain)."= /metrics".proxyPass == "http://127.0.0.1:9428/metrics"
|
||||
&& (locs h.swarm.forge.domain)."/".proxyPass == "http://127.0.0.1:3000/"
|
||||
&& !allLocal.containers.hive-matrix.config.services.matrix-tuwunel.settings.global.allow_encryption;
|
||||
&& !allLocal.containers.hive-matrix.config.services.matrix-tuwunel.settings.global.allow_encryption
|
||||
&& env.SWARM_CONTROLLER_MATRIX_ADMIN_SYNC_IGNORE_USERS == ""
|
||||
&& lib.any (l: l.label == "Forge" && l.url == "https://${h.swarm.forge.domain}/") (
|
||||
builtins.fromJSON env.SWARM_CONTROLLER_LINKS
|
||||
)
|
||||
&&
|
||||
(lib.findFirst (j: j.job_name == "collector") null (
|
||||
(otelSettings allLocal).receivers.prometheus.config.scrape_configs
|
||||
)).static_configs == [ { targets = [ "127.0.0.1:8889" ]; } ];
|
||||
}
|
||||
{
|
||||
# Each old spelling lands on the new path, with its own rename warning;
|
||||
|
|
|
|||
Loading…
Reference in a new issue