add initcontainers support (#63)

Co-authored-by: Youcef Guichi <youcef@gimlet.io>
This commit is contained in:
Laszlo Fogas
2023-03-24 11:16:22 +01:00
committed by GitHub
parent 93892ec341
commit 118cd8e1cb
8 changed files with 152 additions and 26 deletions
+3 -10
View File
@@ -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 -11
View File
@@ -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 }}