external-secrets-cr

by somaz94

Helm chartv0.1.0App 1.0.0Apache-2.0Verified publisher

Custom resources for the External Secrets Operator — SecretStore, ClusterSecretStore, ExternalSecret, ClusterExternalSecret (external-secrets.io/v1) and PushSecret (external-secrets.io/v1alpha1). Deployed alongside the upstream external-secrets chart, which installs the operator and CRDs but does not template these config CRs.

About this chart

external-secrets-cr

Data-driven External Secrets Operator (ESO) configuration custom resources, deployed as a Helm release alongside the upstream external-secrets chart.

The upstream external-secrets/external-secrets chart installs the controller, webhook and CRDs but does not template config CRs (SecretStore, ExternalSecret, PushSecret, ...) — those are left for you to apply out-of-band (typically kubectl apply -f in a post-sync hook). This chart closes that gap so the ESO configuration is managed declaratively in Git, versioned, and rolled out with the same helm / helmfile flow as the operator.

What it deploys

ResourceAPIScopeCreated from
SecretStoreexternal-secrets.io/v1NamespacedsecretStores[]
ClusterSecretStoreexternal-secrets.io/v1ClusterclusterSecretStores[]
ExternalSecretexternal-secrets.io/v1NamespacedexternalSecrets[]
ClusterExternalSecretexternal-secrets.io/v1ClusterclusterExternalSecrets[]
PushSecretexternal-secrets.io/v1alpha1NamespacedpushSecrets[]

Every list defaults to empty, so an unconfigured helm install creates nothing.

Prerequisites

  • Kubernetes >= 1.25
  • External Secrets Operator (controller + webhook) and its CRDs already installed — typically via the upstream external-secrets/external-secrets chart with installCRDs: true. This chart only creates config CRs; it does not install ESO itself or its CRDs.
  • PushSecret requires the external-secrets.io/v1alpha1 CRD (shipped by ESO); omit pushSecrets if your ESO build does not enable it.

Install

OCI registry:

helm install eso-config oci://ghcr.io/somaz94/charts/external-secrets-cr \
  --namespace external-secrets \
  -f my-values.yaml

Classic Helm repo:

helm repo add somaz94 https://charts.somaz.blog
helm install eso-config somaz94/external-secrets-cr \
  --namespace external-secrets \
  -f my-values.yaml

Quick examples

AWS Secrets Manager via EKS Pod Identity / IRSA

A cluster-wide store with no auth block — ESO falls back to the pod's default AWS credential chain, which the Pod Identity agent (or IRSA) populates.

clusterSecretStores:
  - name: aws-secretsmanager
    provider:
      aws:
        service: SecretsManager
        region: eu-central-1

externalSecrets:
  - name: app-db
    namespace: app
    secretStoreRef:
      name: aws-secretsmanager
      kind: ClusterSecretStore
    target:
      name: app-db
      creationPolicy: Owner
    data:
      - secretKey: password
        remoteRef:
          key: prod/app-db
          property: password

HashiCorp Vault (namespaced store)

secretStores:
  - name: vault-backend
    namespace: app
    provider:
      vault:
        server: https://vault.example.com:8200
        path: secret
        version: v2
        auth:
          kubernetes:
            mountPath: kubernetes
            role: eso

externalSecrets:
  - name: app-config
    namespace: app
    secretStoreRef:
      name: vault-backend
      kind: SecretStore
    dataFrom:
      - extract:
          key: app/config

Fan one secret out to many namespaces

clusterExternalSecrets:
  - name: registry-pull
    namespaceSelector:
      matchLabels:
        eso.example.com/pull: "true"
    externalSecretSpec:
      secretStoreRef:
        name: aws-secretsmanager
        kind: ClusterSecretStore
      target:
        name: registry-pull
      data:
        - secretKey: .dockerconfigjson
          remoteRef:
            key: prod/registry-dockerconfig

Push a generated Secret back to the provider

pushSecrets:
  - name: mirror-to-aws
    namespace: app
    secretStoreRefs:
      - name: aws-secretsmanager
        kind: ClusterSecretStore
    selector:
      secret:
        name: app-generated
    data:
      - match:
          secretKey: token
          remoteRef:
            remoteKey: prod/app-generated-token
    updatePolicy: Replace
    deletionPolicy: None

Values reference

Shared metadata

KeyTypeDefaultDescription
commonLabelsmap{}Labels added to every resource.
commonAnnotationsmap{}Annotations added to every resource.

secretStores[] / clusterSecretStores[]

KeyTypeRequiredDescription
namestringyesResource name.
namespacestringnoTarget namespace (secretStores only; default: release namespace).
providermapyesBackend-specific provider block, passed through verbatim.
refreshIntervalintegernoStore refresh interval in seconds (0/empty = controller default). Unlike ExternalSecret/PushSecret, (Cluster)SecretStore takes an integer here, not a duration string.
retrySettingsmapno{ maxRetries, retryInterval }.
conditionslistnoNamespace/label conditions restricting use of the store.
controllerstringnoController class that should process this store.
labels / annotationsmapnoExtra metadata on this resource.
specExtramapnoArbitrary YAML merged into spec.

externalSecrets[]

KeyTypeRequiredDescription
namestringyesExternalSecret name.
namespacestringnoTarget namespace (default: release namespace).
refreshIntervalstringnoSync interval (1h; 0 disables).
secretStoreRefmapno{ name, kind: SecretStore|ClusterSecretStore }.
targetmapno{ name, creationPolicy, deletionPolicy, template }.
datalistnoList of { secretKey, remoteRef }.
dataFromlistnoList of extract / find blocks.
labels / annotations / specExtramapnoExtra metadata / escape hatch.

clusterExternalSecrets[]

KeyTypeRequiredDescription
namestringyesClusterExternalSecret name.
externalSecretNamestringnoName of the ExternalSecret created in each namespace.
namespaceSelectormapnoLabel selector picking target namespaces.
namespaceslistnoExplicit namespace name list.
namespaceSelectorslistnoList of label selectors.
refreshTimestringnoHow often to reconcile the namespace set.
externalSecretSpecmapyesThe ExternalSecret spec projected into each namespace.
labels / annotations / specExtramapnoExtra metadata / escape hatch.

pushSecrets[]

KeyTypeRequiredDescription
namestringyesPushSecret name.
namespacestringnoTarget namespace (default: release namespace).
refreshIntervalstringnoPush interval.
secretStoreRefslistnoList of { name, kind } backends to push to.
selectormapno{ secret: { name } } source Secret selector.
datalistnoList of { match: { secretKey, remoteRef } }.
templatemapnoTemplate applied to the pushed payload.
updatePolicystringnoReplace | IfNotExists.
deletionPolicystringnoDelete | None.
labels / annotations / specExtramapnoExtra metadata / escape hatch.

License

Apache-2.0

Deploy external-secrets-cr with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has external-secrets-cr 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 chartexternal-secrets-cr is pinned at v0.1.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