Watch
0
0
Fork
You've already forked hyperhive
0

k8s: the store-credential unit starts at fork, off the boot and switch path

`swarm-bao-store-auth` was a retrying oneshot on multi-user.target. A
oneshot's start job stays pending through its restarts, so a boot or a switch
with the secret store sealed waited on it for up to 15 minutes, the same
shape as #6901's CA publisher.

It is now `Type=simple` with the shared retry kept: the start job is done at
fork and the unit keeps trying until the store answers. `RemainAfterExit`
leaves it `active (exited)` once the credential is out, and the 15-minute
start timeout goes, as a start job done at fork has no use for it. Nothing
orders after the unit: the gateway reads the file at its next reload and the
pods wait in ContainerCreating for the Secret.

`is-active` is now true while the script runs and `systemctl restart` returns
at fork, so the k8s-services and k8s-nats tests wait for `SubState=exited` where they relied
on either.

Closes #6937
This commit is contained in:
maia 2026-11-27 21:53:05 +01:00
commit 6a50769269

View file

@ -370,7 +370,10 @@ writes to the store and Grafana that reads it.
nginx's main process reads its configuration as root, so the file needs no
other reader, and it's never in the nix store), which the vhost's store
locations `include`, then reloads nginx, and publishes the password as the
Secret the way the host publishes the CA ConfigMap. The files stay on disk, as the cluster keeps the Secret on disk, so a reboot with
Secret the way the host publishes the CA ConfigMap. The unit is `Type=simple`
and retries every 30 seconds, so a boot or a switch with the secret store still
sealed doesn't wait for it; the credential is out once the unit is `active (exited)`.
The files stay on disk, as the cluster keeps the Secret on disk, so a reboot with
the secret store still sealed leaves the gateway sending the credential the pod
expects. Nothing rotates the value
by itself: to rotate it, delete the leaf's metadata with a token that may and