sops: decrypt on every Flux Kustomization + static guard
`spec.decryption` is opt-in per Flux Kustomization, and a secret-*.sops.yaml
under a tree without it is still valid YAML: Flux applies the Secret with
literal ENC[AES256_GCM,...] values and reports success. The Secret is green and
wrong, and the first symptom is an auth failure days later that looks nothing
like a git problem. Only `apps` and `monitoring` had the block; the other six
trees were a trap for the next person to add a Secret there.
- add decryption: {provider: sops, secretRef: sops-age} to cert-manager,
databases, gateway-api-crds, infrastructure, logging and flux-system
(8/8 Kustomizations now decrypt; harmless where no encrypted files exist)
- scripts/check-sops-decryption.py + `make check-sops`: static guard that reads
the live sync path from gotk-sync.yaml, walks each Kustomization's kustomize
resource graph, and fails when a *.sops.yaml file is under a tree whose owner
cannot decrypt, is under no reconciled tree, or is not actually encrypted
(also catches `flux bootstrap` regenerating gotk-sync.yaml without the block)
- .gitattributes marks *.sops.yaml with diff=sopsdiffer; docs/secrets-sops.md
explains the opt-in trap, the eight Kustomizations and the guard
No secret contents, recipients or keys touched.
2026-11-27 00:57:31 -05:00
|
|
|
.PHONY: apply diff storage gateway check-sops
|
2026-09-10 23:38:04 -04:00
|
|
|
|
|
|
|
|
apply:
|
|
|
|
|
kubectl apply -k infrastructure/home
|
|
|
|
|
|
sops: decrypt on every Flux Kustomization + static guard
`spec.decryption` is opt-in per Flux Kustomization, and a secret-*.sops.yaml
under a tree without it is still valid YAML: Flux applies the Secret with
literal ENC[AES256_GCM,...] values and reports success. The Secret is green and
wrong, and the first symptom is an auth failure days later that looks nothing
like a git problem. Only `apps` and `monitoring` had the block; the other six
trees were a trap for the next person to add a Secret there.
- add decryption: {provider: sops, secretRef: sops-age} to cert-manager,
databases, gateway-api-crds, infrastructure, logging and flux-system
(8/8 Kustomizations now decrypt; harmless where no encrypted files exist)
- scripts/check-sops-decryption.py + `make check-sops`: static guard that reads
the live sync path from gotk-sync.yaml, walks each Kustomization's kustomize
resource graph, and fails when a *.sops.yaml file is under a tree whose owner
cannot decrypt, is under no reconciled tree, or is not actually encrypted
(also catches `flux bootstrap` regenerating gotk-sync.yaml without the block)
- .gitattributes marks *.sops.yaml with diff=sopsdiffer; docs/secrets-sops.md
explains the opt-in trap, the eight Kustomizations and the guard
No secret contents, recipients or keys touched.
2026-11-27 00:57:31 -05:00
|
|
|
# Static guard: no secret-*.sops.yaml may sit in a tree whose Flux Kustomization
|
|
|
|
|
# cannot decrypt it (see docs/secrets-sops.md). No cluster or age key needed.
|
|
|
|
|
check-sops:
|
|
|
|
|
./scripts/check-sops-decryption.py
|
|
|
|
|
|
2026-09-10 23:38:04 -04:00
|
|
|
diff:
|
|
|
|
|
kubectl diff -k infrastructure/home
|
|
|
|
|
|
|
|
|
|
storage:
|
|
|
|
|
kubectl apply -k infrastructure/storage
|
|
|
|
|
|
|
|
|
|
gateway:
|
|
|
|
|
kubectl apply -k infrastructure/networking/gateway
|