41 lines
996 B
YAML
41 lines
996 B
YAML
{{- define "common.volumeMountsRef.tpl" -}}
|
|
{{- if or (or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets) .Values.existingFileSecrets }}
|
|
volumeMounts: &volumeMounts
|
|
{{- range .Values.volumes }}
|
|
|
|
{{- $volumeName := .name -}}
|
|
{{- if .existingConfigMap }}
|
|
{{- $volumeName = .existingConfigMap -}}
|
|
{{- end }}
|
|
{{- if .fileName }}
|
|
{{- $volumeName = include "common.robustName" .fileName -}}
|
|
{{- end }}
|
|
|
|
- name: {{ $volumeName }}
|
|
mountPath: {{ .path }}
|
|
{{- if .subPath }}
|
|
subPath: {{ .subPath }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- range .Values.sealedFileSecrets }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .path }}
|
|
readOnly: true
|
|
{{- end }}
|
|
{{- range .Values.fileSecrets }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .path }}
|
|
readOnly: true
|
|
{{- end }}
|
|
{{- range .Values.existingFileSecrets }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .path }}
|
|
{{- if .subPath}}
|
|
subPath: {{ .subPath }}
|
|
{{- end }}
|
|
readOnly: true
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|