docs(secrets-sops): record flux-system/sops-age as an exclusion and add a tested audit query

* sops-age is the one Secret that by definition cannot be in git; it was missing
  from the exclusion table even though the key-location table covers it.
* replaces the placeholder reconciliation snippet with one that was actually run:
  it prints 77 live = 35 in git + 42 excluded, matching the table line for line,
  with nothing in git absent from the cluster.
This commit is contained in:
Sirius DevOps 2026-11-27 00:43:17 -05:00 • committed by Lance Walters
commit 3d6c8b4855

View file

@ -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`.