What
Document (and ideally enforce via tooling) a safe workflow for populating k8s/base/backend-secret.yaml so real secrets never get hand-typed into a manifest that could be accidentally committed, and evaluate External Secrets/Sealed Secrets for a longer-term fix.
Why
k8s/base/backend-secret.yaml currently ships plaintext CHANGE_ME placeholders for DATABASE_URL, JWT_SECRET, STELLAR_SECRET_KEY, ANCHOR_API_KEY, and SDS_API_KEY, intended to be hand-edited and then kubectl apply -f'd. There's no External Secrets Operator or Sealed Secrets integration, and no documented safeguard preventing a real value from ending up committed to git by mistake — notably including a real Stellar secret key.
Scope
In scope:
- Add a clear
k8s/README (or extend infrastructure/README.md) section documenting the safe workflow: never commit real values, use kubectl create secret from local env vars or a secrets manager, or template via CI secrets
- Evaluate and, if adopted, wire up External Secrets Operator or Sealed Secrets so the committed manifest never contains real values even as placeholders in a way that invites hand-editing in place
- Add a pre-commit or CI check that flags if
backend-secret.yaml contains anything other than the placeholder values
Out of scope:
- Migrating actual production secrets (that's an operational task for whoever runs the cluster)
- Other k8s manifests unrelated to secrets
Acceptance Criteria
Technical Context
k8s/base/backend-secret.yaml
infrastructure/README.md, charts/payd/values.yaml / values-production.yaml
What
Document (and ideally enforce via tooling) a safe workflow for populating
k8s/base/backend-secret.yamlso real secrets never get hand-typed into a manifest that could be accidentally committed, and evaluate External Secrets/Sealed Secrets for a longer-term fix.Why
k8s/base/backend-secret.yamlcurrently ships plaintextCHANGE_MEplaceholders forDATABASE_URL,JWT_SECRET,STELLAR_SECRET_KEY,ANCHOR_API_KEY, andSDS_API_KEY, intended to be hand-edited and thenkubectl apply -f'd. There's no External Secrets Operator or Sealed Secrets integration, and no documented safeguard preventing a real value from ending up committed to git by mistake — notably including a real Stellar secret key.Scope
In scope:
k8s/README(or extendinfrastructure/README.md) section documenting the safe workflow: never commit real values, usekubectl create secretfrom local env vars or a secrets manager, or template via CI secretsbackend-secret.yamlcontains anything other than the placeholder valuesOut of scope:
Acceptance Criteria
backend-secret.yamlis committed with non-placeholder valuesTechnical Context
k8s/base/backend-secret.yamlinfrastructure/README.md,charts/payd/values.yaml/values-production.yaml