Watch
0
0
Fork
You've already forked hyperhive
0

k8s: a pod's public CA files come from a ConfigMap, not a Secret

This commit is contained in:
atlas 2026-11-21 15:15:13 +01:00 • committed by maia
commit 485da0c3c7

View file

@ -205,6 +205,32 @@ let
&&
(lib.head (podSpec "swarm-controller").volumes).secret.secretName == "swarm-controller-credentials";
}
{
# The controller's pod is the control for the Secret lookup: its
# credentials still come from one.
name = "the router's CA file comes from the CA ConfigMap and its pod mounts no Secret";
ok =
let
volumes = (podSpec "swarm-notify-router").volumes;
credentials = lib.findFirst (v: v.name == "credentials") null volumes;
sources = credentials.projected.sources;
in
credentials != null
&& lib.length sources == 1
&& (lib.head sources).configMap.name == "hyperhive-ca-trust"
&&
map (i: [
i.key
i.path
]) (lib.head sources).configMap.items == [
[
"bao-server-ca.pem"
"notify-router-bao-server-ca"
]
]
&& !(lib.any (v: v ? secret) volumes)
&& lib.any (v: v ? secret) (podSpec "swarm-controller").volumes;
}
{
name = "the poller's CronJob runs on its timer's interval and deadline, never overlapping";
ok =