mirror of
https://github.com/minio/minio.git
synced 2024-12-25 14:45:54 -05:00
helm: shared secrets handling for user and svcacct's (#16379)
This commit is contained in:
parent
85ff76e7b0
commit
6ac48aff46
@ -91,7 +91,7 @@ connectToMinio $scheme
|
|||||||
{{- range $idx, $svc := .Values.svcaccts }}
|
{{- range $idx, $svc := .Values.svcaccts }}
|
||||||
echo {{ tpl .accessKey $global }} > $MINIO_ACCESSKEY_SECRETKEY_TMP
|
echo {{ tpl .accessKey $global }} > $MINIO_ACCESSKEY_SECRETKEY_TMP
|
||||||
{{- if .existingSecret }}
|
{{- if .existingSecret }}
|
||||||
cat /config/secrets/{{ tpl .existingSecret $global }}/{{ tpl .existingSecretKey $global }} >> $MINIO_ACCESSKEY_SECRETKEY_TMP
|
cat /config/secrets-svc/{{ tpl .existingSecret $global }}/{{ tpl .existingSecretKey $global }} >> $MINIO_ACCESSKEY_SECRETKEY_TMP
|
||||||
# Add a new line if it doesn't exist
|
# Add a new line if it doesn't exist
|
||||||
sed -i '$a\' $MINIO_ACCESSKEY_SECRETKEY_TMP
|
sed -i '$a\' $MINIO_ACCESSKEY_SECRETKEY_TMP
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
@ -93,7 +93,7 @@ connectToMinio $scheme
|
|||||||
{{- range .Values.users }}
|
{{- range .Values.users }}
|
||||||
echo {{ tpl .accessKey $global }} > $MINIO_ACCESSKEY_SECRETKEY_TMP
|
echo {{ tpl .accessKey $global }} > $MINIO_ACCESSKEY_SECRETKEY_TMP
|
||||||
{{- if .existingSecret }}
|
{{- if .existingSecret }}
|
||||||
cat /config/secrets/{{ tpl .existingSecretKey $global }} >> $MINIO_ACCESSKEY_SECRETKEY_TMP
|
cat /config/secrets/{{ tpl .existingSecret $global }}/{{ tpl .existingSecretKey $global }} >> $MINIO_ACCESSKEY_SECRETKEY_TMP
|
||||||
# Add a new line if it doesn't exist
|
# Add a new line if it doesn't exist
|
||||||
sed -i '$a\' $MINIO_ACCESSKEY_SECRETKEY_TMP
|
sed -i '$a\' $MINIO_ACCESSKEY_SECRETKEY_TMP
|
||||||
createUser {{ .policy }}
|
createUser {{ .policy }}
|
||||||
|
@ -63,7 +63,16 @@ spec:
|
|||||||
name: {{ tpl .existingSecret $ }}
|
name: {{ tpl .existingSecret $ }}
|
||||||
items:
|
items:
|
||||||
- key: {{ .existingSecretKey }}
|
- key: {{ .existingSecretKey }}
|
||||||
path: secrets/{{ tpl .existingSecretKey $ }}
|
path: secrets/{{ tpl .existingSecret $ }}/{{ tpl .existingSecretKey $ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- range ( default list .Values.svcaccts ) }}
|
||||||
|
{{- if .existingSecret }}
|
||||||
|
- secret:
|
||||||
|
name: {{ tpl .existingSecret $ }}
|
||||||
|
items:
|
||||||
|
- key: {{ .existingSecretKey }}
|
||||||
|
path: secrets-svc/{{ tpl .existingSecret $ }}/{{ tpl .existingSecretKey $ }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
|
Loading…
Reference in New Issue
Block a user