Merge pull request 'docs(secrets-sops): sops-age exclusion + tested audit query' (#55) from secrets/sops-docs into master
This commit is contained in:
commit
ec6e7436c0
1 changed files with 17 additions and 0 deletions
|
|
@ -130,6 +130,23 @@ from starting, which is exactly what this card exists to prevent. It is a Forgej
|
|||
| `prometheus-kube-prometheus-stack-prometheus`, `alertmanager-kube-prometheus-stack-alertmanager`, `*-generated`, `*-tls-assets-*`, `*-web-config`, `*-cluster-tls-config` | `monitoring` | Rendered by the prometheus-operator from the CRs on every reconcile — writing them into git creates a second, losing writer. Their *inputs* (`alertmanager-telegram`, `grafana-admin`, `grafana-secret-key`) are ours and are committed separately. |
|
||||
| `kube-prometheus-stack-prometheus-token` | `monitoring` | `kubernetes.io/service-account-token`, minted by the token controller. |
|
||||
| `flux-system` | `flux-system` | Git credential created by `flux bootstrap`; it authenticates the very pull that would apply it (chicken-and-egg), and rotating it is a bootstrap operation. |
|
||||
| `sops-age` | `flux-system` | **The age private key.** It cannot encrypt itself and must exist before any file here can be decrypted — it is the one Secret that is by definition out of git. See "Where the key lives" above for the two escrow copies. |
|
||||
|
||||
Every other live Secret is either in git as ciphertext or in the table above. Re-prove that with a
|
||||
clean checkout of `master` (needs the age key in `~/.config/sops/age/keys.txt`):
|
||||
|
||||
```bash
|
||||
kubectl get secret -A -o json \
|
||||
| jq -r '.items[] | "\(.metadata.namespace)/\(.metadata.name)"' | sort > /tmp/live.txt
|
||||
for f in apps/base/*/secret-*.sops.yaml monitoring/controllers/home/secret-*.sops.yaml; do
|
||||
sops decrypt --output-type json "$f" | jq -r '"\(.metadata.namespace)/\(.metadata.name)"'
|
||||
done | sort > /tmp/git.txt
|
||||
comm -23 /tmp/live.txt /tmp/git.txt # live but not restorable from git: must be the table above
|
||||
comm -13 /tmp/live.txt /tmp/git.txt # in git but absent live: must be empty
|
||||
```
|
||||
|
||||
At the 2026-11-27 audit that printed 77 live = 35 in git + 42 excluded, all 42 accounted for above,
|
||||
and nothing in git that was missing from the cluster.
|
||||
|
||||
Now covered (added after the drill in the section below proved the recovery path):
|
||||
`cluster-backup-ssh` (3 namespaces), `grafana-admin`, `grafana-secret-key`, `alertmanager-telegram`.
|
||||
|
|
|
|||
Loading…
Reference in a new issue