Allow mounting of existing secrets (#53)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{{- define "common.volumeMountsRef.tpl" -}}
|
||||
{{- if or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets }}
|
||||
{{- if or (or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets) .Values.existingFileSecrets }}
|
||||
volumeMounts: &volumeMounts
|
||||
{{- range .Values.volumes }}
|
||||
- name: {{ .name }}
|
||||
@@ -15,5 +15,13 @@ volumeMounts: &volumeMounts
|
||||
mountPath: {{ .path }}
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- range .Values.existingFileSecrets }}
|
||||
- name: {{ .name }}
|
||||
mountPath: {{ .path }}
|
||||
{{- if .subPath}}
|
||||
subPath: {{ .subPath }}
|
||||
{{- end }}
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- define "common.volumesRef.tpl" -}}
|
||||
{{- if or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets }}
|
||||
{{- if or (or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets) .Values.existingFileSecrets }}
|
||||
volumes:
|
||||
{{- range .Values.volumes }}
|
||||
- name: {{ .name }}
|
||||
@@ -30,5 +30,10 @@ volumes:
|
||||
secret:
|
||||
secretName: {{ printf "%s-%s" $.Release.Name .name }}
|
||||
{{- end }}
|
||||
{{- range .Values.existingFileSecrets }}
|
||||
- name: {{ .name }}
|
||||
secret:
|
||||
secretName: {{ .name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user