From 4af06de4c3757b4857068a671f7dba7af6fb9179 Mon Sep 17 00:00:00 2001 From: Theodore Herzfeld Date: Fri, 22 Nov 2024 17:38:56 -0500 Subject: [PATCH] Fix extraInitContainers conditional (#7085) --- ci/helm-chart/templates/deployment.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/helm-chart/templates/deployment.yaml b/ci/helm-chart/templates/deployment.yaml index e1925ee47..474653c33 100644 --- a/ci/helm-chart/templates/deployment.yaml +++ b/ci/helm-chart/templates/deployment.yaml @@ -35,8 +35,9 @@ spec: securityContext: fsGroup: {{ .Values.securityContext.fsGroup }} {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }} + {{- if or (and .Values.volumePermissions.enabled .Values.persistence.enabled) .Values.extraInitContainers }} initContainers: + {{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }} - name: init-chmod-data image: busybox:latest imagePullPolicy: IfNotPresent @@ -50,6 +51,7 @@ spec: volumeMounts: - name: data mountPath: /home/coder + {{- end }} {{- if .Values.extraInitContainers }} {{ tpl .Values.extraInitContainers . | indent 6}} {{- end }}