diff --git a/charts/media-common/templates/_helpers.tpl b/charts/media-common/templates/_helpers.tpl index b45e490b..7f0301f3 100644 --- a/charts/media-common/templates/_helpers.tpl +++ b/charts/media-common/templates/_helpers.tpl @@ -51,6 +51,15 @@ app.kubernetes.io/name: {{ include "media-common.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} +{{/* +Init Containers +*/}} +{{- define "media-common.initContainers" -}} +{{- if .Values.initContainers }} +{{- toYaml .Values.initContainers }} +{{- end }} +{{- end -}} + {{/* Additional Containers */}} diff --git a/charts/media-common/templates/deployment.yaml b/charts/media-common/templates/deployment.yaml index aeb31bfb..a391cbde 100644 --- a/charts/media-common/templates/deployment.yaml +++ b/charts/media-common/templates/deployment.yaml @@ -27,6 +27,10 @@ spec: securityContext: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.initContainers }} + initContainers: + {{- include "media-common.initContainers" . | nindent 8 }} + {{- end }} containers: - name: {{ template "media-common.fullname" . }} {{- with .Values.securityContext }} diff --git a/charts/media-common/templates/statefulset.yaml b/charts/media-common/templates/statefulset.yaml index d004b3a0..d0c094e9 100644 --- a/charts/media-common/templates/statefulset.yaml +++ b/charts/media-common/templates/statefulset.yaml @@ -28,6 +28,10 @@ spec: securityContext: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.initContainers }} + initContainers: + {{- include "media-common.initContainers" . | nindent 8 }} + {{- end }} containers: - name: {{ template "media-common.fullname" . }} {{- with .Values.securityContext }} diff --git a/charts/media-common/values.yaml b/charts/media-common/values.yaml index 921158f9..f32efde8 100644 --- a/charts/media-common/values.yaml +++ b/charts/media-common/values.yaml @@ -117,6 +117,8 @@ persistence: ## Do not delete the pvc upon helm uninstall skipuninstall: false +initContainers: [] + additionalContainers: [] additionalVolumes: []