mirror of
https://github.com/minio/minio.git
synced 2025-04-09 06:00:12 -04: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
|
connectToMinio $scheme
|
||||||
|
|
||||||
{{ if .Values.buckets }}
|
{{ if .Values.buckets }}
|
||||||
|
{{ $global := . }}
|
||||||
# Create the buckets
|
# Create the buckets
|
||||||
{{- range .Values.buckets }}
|
{{- range .Values.buckets }}
|
||||||
createBucket {{ .name }} {{ .policy }} {{ .purge }} {{ .versioning }}
|
createBucket {{ tpl .name $global }} {{ .policy }} {{ .purge }} {{ .versioning }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -76,12 +76,13 @@ scheme=http
|
|||||||
connectToMinio $scheme
|
connectToMinio $scheme
|
||||||
|
|
||||||
{{ if .Values.users }}
|
{{ if .Values.users }}
|
||||||
|
{{ $global := . }}
|
||||||
# Create the users
|
# Create the users
|
||||||
{{- range .Values.users }}
|
{{- range .Values.users }}
|
||||||
{{- if .existingSecret }}
|
{{- if .existingSecret }}
|
||||||
createUser {{ .accessKey }} $(cat /config/secrets/{{ .accessKey }}) {{ .policy }}
|
createUser {{ tpl .accessKey $global }} $(cat /config/secrets/{{ tpl .accessKey $global }}) {{ .policy }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
createUser {{ .accessKey }} {{ .secretKey }} {{ .policy }}
|
createUser {{ tpl .accessKey $global }} {{ .secretKey }} {{ .policy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{{- $global := . -}}
|
||||||
{{- if .Values.users }}
|
{{- if .Values.users }}
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
@ -60,10 +61,10 @@ spec:
|
|||||||
{{- range .Values.users }}
|
{{- range .Values.users }}
|
||||||
{{- if .existingSecret }}
|
{{- if .existingSecret }}
|
||||||
- secret:
|
- secret:
|
||||||
name: {{ .existingSecret }}
|
name: {{ tpl .existingSecret $global }}
|
||||||
items:
|
items:
|
||||||
- key: {{ .existingSecretKey }}
|
- key: {{ .existingSecretKey }}
|
||||||
path: secrets/{{ .accessKey }}
|
path: secrets/{{ tpl .accessKey $global }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user