Watch
0
0
Fork
You've already forked hyperhive
0

k8s: deploy.swarm-controller.runtime moves the controller between its unit and the cluster

This commit is contained in:
atlas 2026-11-22 12:28:03 +01:00 • committed by mara
commit 04420a8249

View file

@ -107,9 +107,17 @@ let
# `toString` below so an unset `domain` reaches the assertion that names it
# instead of failing evaluation first.
controllerTcp = swarmCfg.controller.tcp;
# In the cluster the listener is the pod's `hostPort` on the node's address.
# The name the certificate is verified as stays `tcp.domain`
# (`controllerDial`), so the address needs no certificate of its own.
controllerAddress =
if deployCfg.swarm-controller.runtime == "k8s" then
deployCfg.swarm-controller.tcp.hostAddress
else
toString controllerTcp.domain;
controllerUpstream =
if controllerTcp.enable then
"https://${toString controllerTcp.domain}:${toString controllerTcp.port}"
"https://${controllerAddress}:${toString controllerTcp.port}"
else
"http://unix:${deployCfg.swarm-controller.socketPath}:";
# `proxy_http_version` and `Connection` because `recommendedProxySettings`,