mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Support templating accessKey existingSecret and bucket name (#14643)
This commit is contained in:
parent
5c53620a72
commit
7ce1f6e736
@ -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 }}
|
||||
|
@ -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 }}
|
||||
|
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user