Repository navigation
Closed
Labels
effort/lowEffort Low: little workpriority/p2-mediumPriority P2: standard workscope/adrThe architecture decision records and their rulessource/agentFiled by an agenttype/docsType docs: a change to the documentsvalue/mediumValue Medium
Description
Problem
Checked at devops-cli main 4ff4b7c.
- Owner decision of 2026-10-03 (feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741): one devops-cli command writes each cluster Secret from the keyring. Each Secret is a row in
src/devops_cli/k8s/cluster_secrets.py. So a service Secret needs a row in product code. feat(k8s): add the danielpetty-com namespace, project and Secret row #6642, feat(k8s): add the danielpetty-com-pixelfed namespace and Secrets #6645, feat(k8s): add the danielpetty-com backup bucket and key #6648 and feat(k8s): add the danielpetty-com-pixelfed backup bucket and key #6649 planned 7 rows of one site. The owner direction of 2026-11-21 forbids rows of one service in the platform. docs/SERVICE_PATTERNS.md:121(CF4): a secret comes only from a Secret reference, never from git, and only a person changes a Secret.:122(CF5): a person pushes a new Secret before the merge of its manifest.- No Sealed Secrets, External Secrets Operator (ESO) or SOPS runs in the cluster. No ADR covers service Secrets.
- The Argo CD secret management page recommends operators that make the Secret in the destination cluster. It cautions against injection at manifest generation (KSOPS or a plugin).
- ESO (Apache-2.0, CNCF, chart 2.15.0 of 2026-11-10) has a Kubernetes provider, a
Passwordgenerator andPushSecretwithupdatePolicy: IfNotExists. Argo CD has built-in health checks forExternalSecretandPushSecret. A Secret that ESO makes has an owner reference, so an AppProject needs no orphan ignore for it.
Proposed remedy
Write ADR 0033, and change CF4, CF5 and SECURITY.md principle 1 in the same pull request.
- Service Secrets come from ESO with the Kubernetes provider. Each service gets one store namespace
<name>-secrets. The tenant chart of dan-petty/infra makes theSecretStorein each service namespace (feat(secrets): add the External Secrets Operator templates infra#12). The service repository holds onlyExternalSecret,PushSecretandPasswordobjects. Its AppProject allows noSecret, noSecretStoreand no other generator. - A remote key in a store namespace starts with its source namespace:
<namespace>.<secret>. So two namespaces of one service never share a value by accident. - A value that nobody types comes from a
Passwordgenerator. APushSecretwithupdatePolicy: IfNotExistsanddeletionPolicy: Nonekeeps it in the store namespace, so it never changes. AnExternalSecretreads it back. - A person writes a typed value into the store namespace with
kubectl create secret generic <namespace>.<name> --from-file=<key>=/dev/stdin. No value goes into git. - A value that must never change (an encryption key, a restic password) gets an offline copy that the owner keeps.
devops k8s push-secretsstays the path of the platform Secrets. Their row definitions move to homelab data later (dan-petty/homelab#96, refactor(k8s): read the environment Secret rows from homelab #6685); the keyring stays their store.- Rejected: Sealed Secrets (no generator, ciphertext in git against CF4, one vendor); SOPS with KSOPS (repo-server holds the key, and the cache holds plaintext); a push-secrets table for each repository (home-grown code that duplicates ESO, AGENTS.md rule 3).
- CF4: a service Secret comes from an
ExternalSecret. CF5: a sync wave puts theExternalSecretbefore its reader, so no person push comes before the merge of a generated value.
Acceptance criteria
-
ls docs/adr/0033-*.mdfinds one file, anddocs/adr/README.mdlists it. -
grep -n ExternalSecret docs/SERVICE_PATTERNS.md SECURITY.mdfinds CF4, CF5 and principle 1. -
uv run devops ci --check --only docs,domainpasses.
Person steps
- None. Owner decision of 2026-11-21: the cluster-wide External Secrets Operator is approved as the path of service Secrets beside the decision of feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 (push-secrets stays the path of the platform Secrets). A value that a
Passwordgenerator makes after a person merges the pull request that declares it counts as a person change of a Secret. A typed value still comes only from a person.
Dependencies
- docs(adr): record the four homes of the infrastructure #6674 (ADR 0032 takes the number before this one).
Metadata
Metadata
Assignees
Labels
effort/lowEffort Low: little workpriority/p2-mediumPriority P2: standard workscope/adrThe architecture decision records and their rulessource/agentFiled by an agenttype/docsType docs: a change to the documentsvalue/mediumValue Medium
Activity
dan-petty commentedon Nov 21, 2026
Both concern cluster Secret management, but #741 delivered devops-cli push commands while this candidate writes the ADR that changes the service Secret policy away from that approach.docs(guidelines): give a new service its Secrets from ESO (#6675)
docs(kb): give the Secret advice of Helm and Kustomize the ESO path (#…
docs(openspec): plan the ESO service Secrets ADR (#6675)
docs(adr): take service Secrets from External Secrets Operator (#6675)
docs(openspec): archive the ESO service Secrets ADR change (#6675)
docs(guidelines): give a new service its Secrets from ESO (#6675)
docs(kb): give the Secret advice of Helm and Kustomize the ESO path (#…