`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.
31 lines
1.2 KiB
YAML
31 lines
1.2 KiB
YAML
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
kind: Kustomization
|
|
metadata:
|
|
name: databases
|
|
namespace: flux-system
|
|
spec:
|
|
interval: 10m0s
|
|
retryInterval: 1m
|
|
timeout: 5m
|
|
sourceRef:
|
|
kind: GitRepository
|
|
name: flux-system
|
|
path: ./infrastructure/databases/base
|
|
# The CloudNativePG operator bundle contains its 11 CRDs, and the vendored
|
|
# Barman Cloud plugin adds the `ObjectStore` CRD. Those must never be pruned
|
|
# automatically: dropping them would delete every Cluster/Database/Backup
|
|
# object (and the Forgejo and portal Postgres clusters with them). Same
|
|
# reasoning as gateway-api-crds. Reverting the operator Deployment args is a
|
|
# git change, not a prune.
|
|
prune: false
|
|
# Uniform SOPS policy; harmless with no encrypted files in this tree, and it
|
|
# removes the "which tree am I in" trap — see docs/secrets-sops.md.
|
|
decryption:
|
|
provider: sops
|
|
secretRef:
|
|
name: sops-age
|
|
# The plugin's operator<->plugin mTLS pair is issued by cert-manager
|
|
# (Issuer/Certificate in the vendored plugin manifest). Applying those before
|
|
# the cert-manager CRDs and webhook exist just churns; wait for it.
|
|
dependsOn:
|
|
- name: cert-manager
|