This repository has been archived on 2024-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
onechart/charts/common/templates/_volumeMountsRef.yaml
T
2023-03-16 13:28:02 +01:00

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 }}