add initcontainers support (#63)
Co-authored-by: Youcef Guichi <youcef@gimlet.io>
This commit is contained in:
@@ -2,21 +2,14 @@
|
||||
{{- 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 }}
|
||||
{{- if not (hasPrefix "init-" .name) }}
|
||||
- name: {{ .name }}
|
||||
mountPath: {{ .path }}
|
||||
{{- if .subPath }}
|
||||
subPath: {{ .subPath }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range .Values.sealedFileSecrets }}
|
||||
- name: {{ .name }}
|
||||
mountPath: {{ .path }}
|
||||
|
||||
@@ -2,16 +2,7 @@
|
||||
{{- if or (or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets) .Values.existingFileSecrets }}
|
||||
volumes:
|
||||
{{- range .Values.volumes }}
|
||||
|
||||
{{- $volumeName := .name -}}
|
||||
{{- if .existingConfigMap }}
|
||||
{{- $volumeName = .existingConfigMap -}}
|
||||
{{- end }}
|
||||
{{- if .fileName }}
|
||||
{{- $volumeName = include "common.robustName" .fileName -}}
|
||||
{{- end }}
|
||||
|
||||
- name: {{ $volumeName }}
|
||||
- name: {{ .name }}
|
||||
{{- if .emptyDir }}
|
||||
emptyDir: {}
|
||||
{{- else if .existingConfigMap }}
|
||||
@@ -19,7 +10,7 @@ volumes:
|
||||
name: {{ .existingConfigMap }}
|
||||
{{- else if .fileName }}
|
||||
configMap:
|
||||
name: {{ $volumeName }}
|
||||
name: {{ template "common.robustName" .fileName }}
|
||||
{{- else if .hostPath }}
|
||||
hostPath:
|
||||
path: {{ .hostPath.path }}
|
||||
|
||||
Reference in New Issue
Block a user