secrets: SOPS the backup SSH key and monitoring's hand-made Secrets (F12, part 2)
Completes F12 on the objects deliberately held back until the delete-and-reconcile drill on siriusdevops/siriusdevops-contact had proved the path works (it did: deleted 05:29:03Z, recreated by Flux 05:29:05Z, byte-identical, pod restarted off the recovered Secret and /health 200 — see docs/secrets-sops.md). * cluster-backup-ssh in forgejo, sirius-growth and monitoring — three files, one plaintext ed25519 key: a Secret cannot cross namespaces and each backup CronJob mounts its own namespace's copy, so all three must exist and all three must be rotated together. * monitoring/grafana-admin, monitoring/grafana-secret-key and monitoring/alertmanager-telegram, which are the *inputs* the prometheus-operator and Grafana consume; the operator's rendered prometheus-*/alertmanager-* objects stay excluded (a second writer would fight it). * monitoring Kustomization gains the same sops decryption block as apps. All six files were generated from the live objects and decrypt to a byte-identical data map and type, so this apply is a no-op.
This commit is contained in:
parent
f2c6de0ccb
commit
a4cc2d87bc
7 changed files with 92 additions and 10 deletions
|
|
@ -84,17 +84,24 @@ Ordering note: a Secret must exist before its consumer starts (CNPG `bootstrap.i
|
|||
`imagePullSecrets`, env refs). Kustomize sorts `Secret` before `Deployment`/`Cluster`, and all
|
||||
of these live in the same app directory, so one reconcile creates both.
|
||||
|
||||
## Inventory — in git (29 Secrets, 7 namespaces)
|
||||
## Inventory — in git (35 Secrets, 8 namespaces)
|
||||
|
||||
| Namespace | Secrets |
|
||||
|-----------|---------|
|
||||
| `forgejo` | `forgejo-pg-app`, `forgejo-runner-amd64-token`, `forgejo-runner-deploy-arm64-token` |
|
||||
| `forgejo` | `forgejo-pg-app`, `forgejo-runner-amd64-token`, `forgejo-runner-deploy-arm64-token`, `cluster-backup-ssh` |
|
||||
| `siriusdevops` | `siriusdevops-contact`, `garage-media-s3`, `forgejo-pull` |
|
||||
| `piedmont` | `piedmont-contact`, `forgejo-pull` |
|
||||
| `sirius-growth` | `sirius-growth-contact`, `sirius-growth-blog-app`, `sirius-growth-blog-s3`, `sirius-growth-portal-app`, `sirius-growth-portal-db`, `sirius-growth-portal-s3`, `portal-wal-s3`, `forgejo-pull` |
|
||||
| `sirius-growth` | `sirius-growth-contact`, `sirius-growth-blog-app`, `sirius-growth-blog-s3`, `sirius-growth-portal-app`, `sirius-growth-portal-db`, `sirius-growth-portal-s3`, `portal-wal-s3`, `forgejo-pull`, `cluster-backup-ssh` |
|
||||
| `osint` | `osint-admin`, `osint-db`, `forgejo-pull` |
|
||||
| `metabase` | `pg-app`, `metabase-admin`, `metabase-data-source-creds` |
|
||||
| `customer1` | `pg-app`, `pg-users`, `odoo-config`, `odoo-admin`, `metabase-admin`, `metabase-data-source-creds`, `metabase-secret-key` |
|
||||
| `monitoring` | `grafana-admin`, `grafana-secret-key`, `alertmanager-telegram`, `cluster-backup-ssh` |
|
||||
|
||||
`cluster-backup-ssh` is the same ed25519 key in three namespaces — a Secret cannot be
|
||||
referenced across namespaces and each backup CronJob mounts its own namespace's copy, so there
|
||||
are three files with identical plaintext (distinct ciphertext; age uses a random nonce).
|
||||
Rotating it means updating all three.
|
||||
|
||||
|
||||
`*-pg-app` / `pg-app` / `sirius-growth-portal-db` deserve a note: these look like CNPG output but
|
||||
are **ours** — each Cluster's `bootstrap.initdb.secret.name` points at one of them, so CNPG reads
|
||||
|
|
@ -124,12 +131,24 @@ from starting, which is exactly what this card exists to prevent. It is a Forgej
|
|||
| `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. |
|
||||
|
||||
Out of scope for this pass, tracked separately: `cluster-backup-ssh` (3 copies), `grafana-admin`,
|
||||
`grafana-secret-key`, `alertmanager-telegram` live in `monitoring`/backup CronJobs and are being
|
||||
migrated in a follow-up commit once the delete-and-reconcile drill below proved the path.
|
||||
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`.
|
||||
|
||||
## Delete-and-reconcile drill (2026-11-27)
|
||||
## Delete-and-reconcile drill (2026-11-27T05:29Z)
|
||||
|
||||
Target: `siriusdevops/siriusdevops-contact` (Telegram token for the contact form — losing it for
|
||||
a couple of minutes degrades one form, breaks nothing else).
|
||||
|
||||
```
|
||||
05:28:59Z pre: pod Ready, /health {"ok":true}, keys TG_CHAT,TG_TOKEN, data sha256 1f17a3ac…
|
||||
05:29:03Z kubectl -n siriusdevops delete secret siriusdevops-contact
|
||||
05:29:05Z recreated by Flux (~2s, forced reconcile) — same keys, same data sha256 1f17a3ac…
|
||||
05:29:11Z kubectl rollout restart deploy/siriusdevops-contact (prove env resolves from the
|
||||
recovered Secret, not pod memory)
|
||||
05:29:23Z rollout complete; new pod Ready, env TG_CHAT/TG_TOKEN present, /health {"ok":true}
|
||||
both via localhost:8090 and via svc DNS + ClusterIP
|
||||
```
|
||||
|
||||
Same key names before and after, byte-identical data, Secret back in the `apps` Kustomization
|
||||
inventory. Only key **names** are recorded here.
|
||||
|
||||
`siriusdevops/siriusdevops-contact` — deleted, Flux recreated it from git, values verified
|
||||
identical to the pre-delete snapshot, contact API still serving `/health`. Evidence in the
|
||||
kanban card for `t_46f03ecb` (key names only, never values).
|
||||
|
|
|
|||
Loading…
Reference in a new issue