vault-secretstore-controller

by IMIO

Helm chartv0.2.0App 0.1.0Apache-2.0Verified publisher

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

ValueRequiredDefaultDescription
clusterNameyes—This cluster's name, used as the Vault AppRole Role prefix. See below.
vaultAddryes—Vault server address, e.g. https://vault.imio.be.
approleBackendnobinary default (approle-externalsecrets)Vault AppRole auth backend mount path.
pollIntervalnobinary default (1m)How often the Controller sweeps Vault for AppRole Role changes.
image.repositorynoharbor.imio.be/infra/vault-secretstore-controllerController image.
image.tagno.Chart.AppVersionImage tag.
image.pullPolicynoIfNotPresentImage pull policy.
imagePullSecretsno[{name: harbor-secret}]Pull secrets for the Harbor registry.
serviceAccount.createnotrueCreate a ServiceAccount for the Controller.
serviceAccount.namenochart fullnameServiceAccount name when create is false, or override when true.
serviceAccount.annotationsno{}Annotations on the created ServiceAccount.
vaultAuth.tokenSecretNameno—Name of an existing static-token Secret. See Vault authentication.
vaultAuth.tokenSecretKeynoVAULT_TOKENKey within that Secret.
extraVolumesno[]Extra pod volumes, e.g. for mounting an internal CA bundle.
extraInitContainersno[]Extra init containers, e.g. for fetching an internal CA bundle.
extraVolumeMountsno[]Extra volume mounts on the Controller container.
extraEnvno[]Extra environment variables on the Controller container, e.g. VAULT_CACERT.
resourcesno{}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 Deployment running a single replica (no leader election yet — more than one replica would run duplicate, conflicting reconciles).
  • A ServiceAccount (when serviceAccount.create is true).
  • A ClusterRole/ClusterRoleBinding granting the Controller get, list, watch on namespaces, and get, list, watch, create, update, delete on Secrets and external-secrets.io SecretStores 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartvault-secretstore-controller is pinned at v0.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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