Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: package option moves to deploy.swarm-controller.ui.package

The swarm UI has no switch of its own since it runs wherever the
controller runs; its package option follows it under
deploy.swarm-controller.ui. deploy.swarm-ui.package and
swarm.ui.package stay as renames and warn at evaluation. The flake's
default, the vhost root and the module-eval stub use the new path.
This commit is contained in:
atlas 2026-10-15 23:16:07 +02:00 • committed by mara
commit 1302288474
6 changed files with 37 additions and 12 deletions

View file

@ -73,7 +73,8 @@ let
# The swarm UI on the controller's host — the control the absence arm
# needs, since nothing else in this suite renders this vhost and an arm
# saying "it is not there" would hold just as well if it were never there.
# Package stubbed per this file's header: the vhost roots at it.
# Package stubbed per this file's header: the vhost roots at it. Set through
# its old `deploy.swarm-ui.package` spelling, which must reach the vhost.
#
# Also sets both ignored UI switches to `false`: the vhost must render
# regardless, and each must evaluate and warn. Neither
@ -307,6 +308,20 @@ let
name = "the swarm UI claims the swarm apex wherever this host runs the swarm controller";
ok = swarmUiHere.services.nginx.virtualHosts ? "t.local";
}
{
name = "the old swarm UI package spelling sets the controller's UI package, which the vhost serves";
ok =
let
uiPackage = swarmUiHere.services.hyperhive.deploy.swarm-controller.ui.package;
in
uiPackage == pkgs.emptyDirectory
&& swarmUiHere.services.nginx.virtualHosts."t.local".locations."/".root == "${uiPackage}"
&& lib.any (
w:
lib.hasInfix "services.hyperhive.deploy.swarm-ui.package" w
&& lib.hasInfix "services.hyperhive.deploy.swarm-controller.ui.package" w
) swarmUiHere.warnings;
}
{
# Control: `swarmServicesHere` sets neither ignored switch.
name = "a definition of an ignored swarm UI switch evaluates and warns, naming the option and the controller";