Allow mounting of existing secrets (#53)

This commit is contained in:
Marcel Lambacher
2022-09-15 09:35:08 +02:00
committed by GitHub
parent 966f0672c7
commit afcfc36e5f
4 changed files with 101 additions and 2 deletions
@@ -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 }}
+6 -1
View File
@@ -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 -}}