From 3ee806f563c04f9f48dbe97993b5828fd127bec5 Mon Sep 17 00:00:00 2001 From: Drew Date: Sat, 26 Sep 2020 18:36:54 -0700 Subject: [PATCH] [media-common] Wrap in conditional statement Had a feeling I needed this! --- charts/media-common/templates/deployment.yaml | 4 +++- charts/media-common/templates/statefulset.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/media-common/templates/deployment.yaml b/charts/media-common/templates/deployment.yaml index 36bd4612..a391cbde 100644 --- a/charts/media-common/templates/deployment.yaml +++ b/charts/media-common/templates/deployment.yaml @@ -27,8 +27,10 @@ spec: securityContext: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.initContainers }} initContainers: - {{- include "media-common.initContainers" . | nindent 8 }} + {{- 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 e51b34ab..d0c094e9 100644 --- a/charts/media-common/templates/statefulset.yaml +++ b/charts/media-common/templates/statefulset.yaml @@ -28,8 +28,10 @@ spec: securityContext: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.initContainers }} initContainers: - {{- include "media-common.initContainers" . | nindent 8 }} + {{- include "media-common.initContainers" . | nindent 8 }} + {{- end }} containers: - name: {{ template "media-common.fullname" . }} {{- with .Values.securityContext }}