`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.
6 lines
386 B
Text
6 lines
386 B
Text
# `git diff` on an encrypted Secret is otherwise a wall of ciphertext.
|
|
# Enable the driver once per workstation (needs the age key in ~/.config/sops/age/keys.txt):
|
|
# git config --global diff.sopsdiffer.textconv 'sops decrypt --output-type yaml'
|
|
# Without that config the attribute is inert and git diffs the file as plain text.
|
|
*.sops.yaml diff=sopsdiffer
|
|
*.sops.yml diff=sopsdiffer
|