diff --git a/charts/default-templates/Chart.yaml b/charts/default-templates/Chart.yaml index 7f1a3e1..a274904 100644 --- a/charts/default-templates/Chart.yaml +++ b/charts/default-templates/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -appVersion: '1.1.19' -version: '1.1.19' +appVersion: '1.1.20' +version: '1.1.20' name: default-templates description: Default templates chart icon: https://hub.docker.com/public/images/logos/mini-logo.svg diff --git a/charts/default-templates/templates/_secret.external.multi.tpl b/charts/default-templates/templates/_secret.external.multi.tpl index 11a5a92..07618cc 100644 --- a/charts/default-templates/templates/_secret.external.multi.tpl +++ b/charts/default-templates/templates/_secret.external.multi.tpl @@ -1,10 +1,9 @@ {{- define "chart.secret.external.multi" -}} -{{- $secretStore := .Values.extSecrets.secretStore }} -{{- range $secret, $val := .Values.extSecrets.values }} +{{- range $secretName, $secretConfig := .Values.extSecrets }} apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: - name: {{ $secret }} + name: {{ $secretName }} labels: {{ include "chart.labels" $ | nindent 4 }} annotations: force-sync: {{ now | quote }} @@ -12,16 +11,17 @@ spec: refreshInterval: '0' secretStoreRef: kind: ClusterSecretStore - name: {{ $secretStore }} + name: {{ $secretConfig.secretStore }} target: creationPolicy: Owner - name: {{ $secret }} + name: {{ $secretName }} data: -{{- range $key, $secrets := $val }} -{{- range $secrets }} +{{- range $secretConfig.secrets }} +{{- $remoteKey := .name }} +{{- range .keys }} - secretKey: {{ . }} remoteRef: - key: {{ $key }} + key: {{ $remoteKey }} property: {{ . }} {{- end }} {{- end }}