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

@ -43,7 +43,9 @@ The renderer reads the service's evaluated unit, not a copy of its settings:
- **Files:** the pod mounts each file the unit names at the same path,
so the environment carries over unchanged:
- credentials at `/run/credentials/<service>.service/<id>`, from the Secret
`<service>-credentials`, one key per `LoadCredential` id;
`<service>-credentials`, one key per `LoadCredential` id, except the ones
that are public CA files, which come from the ConfigMap
`hyperhive-ca-trust` [below](#secrets);
- trust bundles (any `…/trust-bundle.pem` the environment names), from the
ConfigMap `hyperhive-ca-trust`, key `trust-bundle.pem`;
- `RuntimeDirectory` as an `emptyDir`, and `StateDirectory` on the
@ -69,9 +71,15 @@ commit.
The YAML lands in the world-readable nix store, so it holds no credential.
It names the Secret `<service>-credentials` and the credential ids as keys.
It never names the host path the unit loads a credential from, and never its
contents. The `hyperhive-ca-trust` ConfigMap is only referenced as well,
because the hive CA exists only at runtime. Nothing here creates either
object.
contents. Nothing here creates the Secret.
A credential that holds a public CA file isn't a secret. `swarm-notify-router`'s
`notify-router-bao-server-ca` comes from the ConfigMap `hyperhive-ca-trust`,
key `bao-server-ca.pem`, and its trust bundles from the key `trust-bundle.pem`.
The manifests only name the ConfigMap, because the hive CA exists only at
runtime, and nothing here creates it. A service with both kinds of credential
gets one projected volume that merges the Secret's keys and the ConfigMap's into
the credential directory.
## Pods