vault-secretstore-controller
by IMIO
Per-cluster Vault SecretStore operator (INFRA-6881) — reconciles external-secrets-approle Secret/SecretStore pairs from Vault AppRole Role state
About this chart
vault-secretstore-controller
Helm chart for the per-cluster Vault SecretStore Controller (INFRA-6881).
The Controller reconciles external-secrets-approle Secret/SecretStore
pairs from Vault AppRole Role state: it polls Vault for AppRole Roles under
auth/<approleBackend>/role/<clusterName>-<namespace> and keeps a matching
Secret + external-secrets.io SecretStore in sync in each namespace.
Installing
Pull Helm release
helm repo add imio https://imio.github.io/helm-charts
helm repo update
Verify the chart signature
Since release 3.0.1, packaged charts are signed. See
IMIO/helm-charts — Verify chart signatures
for how to verify.
Install the chart
helm install vault-secretstore-controller imio/vault-secretstore-controller \
--set clusterName=<cluster-name> \
--set vaultAddr=https://vault.imio.be
or by cloning this repository:
git clone https://github.com/imio/helm-vault-secretstore-controller.git
cd helm-vault-secretstore-controller
helm install vault-secretstore-controller . \
--set clusterName=<cluster-name> \
--set vaultAddr=https://vault.imio.be
clusterName and vaultAddr are required and have no default — see
Configuration.
Configuration
| Value | Required | Default | Description |
|---|---|---|---|
clusterName | yes | — | This cluster's name, used as the Vault AppRole Role prefix. See below. |
vaultAddr | yes | — | Vault server address, e.g. https://vault.imio.be. |
approleBackend | no | binary default (approle-externalsecrets) | Vault AppRole auth backend mount path. |
pollInterval | no | binary default (1m) | How often the Controller sweeps Vault for AppRole Role changes. |
image.repository | no | harbor.imio.be/infra/vault-secretstore-controller | Controller image. |
image.tag | no | .Chart.AppVersion | Image tag. |
image.pullPolicy | no | IfNotPresent | Image pull policy. |
imagePullSecrets | no | [{name: harbor-secret}] | Pull secrets for the Harbor registry. |
serviceAccount.create | no | true | Create a ServiceAccount for the Controller. |
serviceAccount.name | no | chart fullname | ServiceAccount name when create is false, or override when true. |
serviceAccount.annotations | no | {} | Annotations on the created ServiceAccount. |
vaultAuth.tokenSecretName | no | — | Name of an existing static-token Secret. See Vault authentication. |
vaultAuth.tokenSecretKey | no | VAULT_TOKEN | Key within that Secret. |
extraVolumes | no | [] | Extra pod volumes, e.g. for mounting an internal CA bundle. |
extraInitContainers | no | [] | Extra init containers, e.g. for fetching an internal CA bundle. |
extraVolumeMounts | no | [] | Extra volume mounts on the Controller container. |
extraEnv | no | [] | Extra environment variables on the Controller container, e.g. VAULT_CACERT. |
resources | no | {} | Pod resource requests/limits. |
clusterName is used as the Vault AppRole Role prefix
(auth/<approleBackend>/role/<clusterName>-<namespace>). It is deliberately
not inferred from .Release.Name/.Release.Namespace, which are
user-controlled at install time, while cluster identity must not be.
What the chart deploys
- A
Deploymentrunning a single replica (no leader election yet — more than one replica would run duplicate, conflicting reconciles). - A
ServiceAccount(whenserviceAccount.createistrue). - A
ClusterRole/ClusterRoleBindinggranting the Controllerget,list,watchonnamespaces, andget,list,watch,create,update,deleteonSecrets andexternal-secrets.ioSecretStores cluster-wide.
Vault authentication
Until Kubernetes-auth login is implemented, the Controller authenticates to Vault with a static token. Create the Secret yourself before installing:
kubectl create secret generic vault-token --from-literal=VAULT_TOKEN=<token>
then point the chart at it:
helm install vault-secretstore-controller . \
--set clusterName=<cluster-name> \
--set vaultAddr=https://vault.imio.be \
--set vaultAuth.tokenSecretName=vault-token
Contributing
Feel free to contribute by making a pull request.
Please read the official Helm Contribution Guide from Helm for more information on how you can contribute to this Chart.
License
Apache License 2.0
Deploy vault-secretstore-controller with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has vault-secretstore-controller on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartvault-secretstore-controller is pinned at v0.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply