diff --git a/helm/minio/templates/_helper_create_bucket.txt b/helm/minio/templates/_helper_create_bucket.txt index 15bbb3bfa..35a48fca7 100644 --- a/helm/minio/templates/_helper_create_bucket.txt +++ b/helm/minio/templates/_helper_create_bucket.txt @@ -101,8 +101,9 @@ scheme=http connectToMinio $scheme {{ if .Values.buckets }} +{{ $global := . }} # Create the buckets {{- range .Values.buckets }} -createBucket {{ .name }} {{ .policy }} {{ .purge }} {{ .versioning }} +createBucket {{ tpl .name $global }} {{ .policy }} {{ .purge }} {{ .versioning }} {{- end }} {{- end }} diff --git a/helm/minio/templates/_helper_create_user.txt b/helm/minio/templates/_helper_create_user.txt index 565413eda..77714287a 100644 --- a/helm/minio/templates/_helper_create_user.txt +++ b/helm/minio/templates/_helper_create_user.txt @@ -76,12 +76,13 @@ scheme=http connectToMinio $scheme {{ if .Values.users }} +{{ $global := . }} # Create the users {{- range .Values.users }} {{- if .existingSecret }} -createUser {{ .accessKey }} $(cat /config/secrets/{{ .accessKey }}) {{ .policy }} +createUser {{ tpl .accessKey $global }} $(cat /config/secrets/{{ tpl .accessKey $global }}) {{ .policy }} {{ else }} -createUser {{ .accessKey }} {{ .secretKey }} {{ .policy }} +createUser {{ tpl .accessKey $global }} {{ .secretKey }} {{ .policy }} {{- end }} {{- end }} {{- end }} diff --git a/helm/minio/templates/post-install-create-user-job.yaml b/helm/minio/templates/post-install-create-user-job.yaml index 9c47cad2e..d3750e8cb 100644 --- a/helm/minio/templates/post-install-create-user-job.yaml +++ b/helm/minio/templates/post-install-create-user-job.yaml @@ -1,3 +1,4 @@ +{{- $global := . -}} {{- if .Values.users }} apiVersion: batch/v1 kind: Job @@ -60,10 +61,10 @@ spec: {{- range .Values.users }} {{- if .existingSecret }} - secret: - name: {{ .existingSecret }} + name: {{ tpl .existingSecret $global }} items: - key: {{ .existingSecretKey }} - path: secrets/{{ .accessKey }} + path: secrets/{{ tpl .accessKey $global }} {{- end }} {{- end }} {{- if .Values.tls.enabled }}