Deploy the Vault Secrets Operator across clusters #1524
Labels
No labels
epic
fleet:hub
fleet:identity
fleet:ingress
fleet:offload
fleet:sveltos
needs-triage
ready-for-agent
ready-for-human
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lab/clusters#1524
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Deploy the Vault Secrets Operator across clusters
ADR-0004 in
lab/iacdesignates the Vault Secrets Operator (VSO) as the read path for Vault secrets — per-appVaultAuth(serviceAccountRefto the app's own SA) syncing scoped KV paths into native Kubernetes Secrets viaVaultStaticSecret. VSO is currently documented but deployed nowhere. This change ships the operator itself.Why VSO for reads (and why not just ESO)
The ADR's original framing — that ESO's
ClusterSecretStoregives every app "kingdom-wide visibility" — describes the current setup, not a fundamental ESO limitation. ESO can do per-app identity: a namespacedSecretStorewithauth.kubernetes.serviceAccountRef→ the app's own SA → a per-app Vault role → a per-app policy is structurally the same mapping as VSO'sVaultAuth.serviceAccountRef. A reconfigured per-app ESO would already provide per-app Vault isolation plus the same K8s-side RBAC layer on the outputSecret.VSO's genuine deltas over a well-configured per-app ESO are narrower than "ESO can't do per-app":
VaultAuth, its ServiceAccount, and theVaultStaticSecretto co-locate in one namespace — a hard guardrail against cross-namespace impersonation. ESO's equivalent is convention + config (aClusterSecretStorewith cross-namespace reach is a footgun you have to close withconditions/namespaceSelector).VaultDynamicSecretandVaultPKISecretare scoped per-app SA the same way as static secrets, so the model extends to dynamic and PKI secrets without a second integration. ESO handles dynamic secrets via a generator (a different mechanism) and PKI is more awkward.The one capability with no overlap is the write path: ESO
PushSecrethas no VSO equivalent (VSO has no push primitive). That is the unambiguous reason ESO stays in the stack. VSO's win on the read path is ergonomics + the structural guarantee, not a capability ESO fundamentally lacks.Scope
Deploy VSO on the clusters that already consume Vault via the ESO
vault-backendClusterSecretStore:miniportable(runs the Vault server itself)remotemx2andlocalhostare out of scope.Deliverables
generic-templates/vault-secrets-operator/— a shared template mirroringgeneric-templates/cnpg/+ the tofu-controllercrds: Createidiom:HelmRepository hashicorp→https://helm.releases.hashicorp.comHelmRelease vault-secrets-operatorv1.5.1 (chart self-manages CRDs viainstall.crds: Create/upgrade.crds: CreateReplace)defaultVaultConnection.enabled: true→https://vault.animeteamspeak.moe(public letsencrypt cert, noskipTLSVerify/caCertSecret)defaultAuthMethod.enabled: false— ADR-0004 mandates per-appVaultAuth, no shared operator identityKustomizationpointerclusters/<name>/vault-secrets-operator.yamlfor mini, portable, remote.hashicorpHelmRepository fromclusters/portable/helmsources/andclusters/remote/helmsources/(the template ships the identical source;clusters/portable/vault/helmRelease.yamlis unaffected — same name/url).Out of scope (separate
lab/iacwork, per ADR-0004)kubernetesauth backend + token-reviewervault_kubernetes_auth_backend_rolebound toapp-a-vsoapp-a-vsoServiceAccounts and per-appVaultAuth/VaultStaticSecret/VaultAuthGlobalCRs in app reposThe operator reconciles fine without these; only actual
VaultStaticSecretCRs trigger Vault logins. ESOClusterSecretStore vault-backendstays (write path + existing apps).Closing: reads go through ESO with ServiceAccount/JWT auth to OpenBao (#1669, lab/iac eso-mini.tf). VSO PR #1525 was closed unmerged.
Follow-up to the closing note: closing this does not mean the per-app isolation argued for above was delivered. ESO reads are isolated per cluster today. ADR-0012 (lab/iac#188) records that; per-app SecretStores are lab/iac#186 and the interim namespace lists are #1784.