Skip to content

Commit 4af06de

Browse files
Fix extraInitContainers conditional (coder#7085)
1 parent b0c935a commit 4af06de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ci/helm-chart/templates/deployment.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ spec:
3535
securityContext:
3636
fsGroup: {{ .Values.securityContext.fsGroup }}
3737
{{- end }}
38-
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
38+
{{- if or (and .Values.volumePermissions.enabled .Values.persistence.enabled) .Values.extraInitContainers }}
3939
initContainers:
40+
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
4041
- name: init-chmod-data
4142
image: busybox:latest
4243
imagePullPolicy: IfNotPresent
@@ -50,6 +51,7 @@ spec:
5051
volumeMounts:
5152
- name: data
5253
mountPath: /home/coder
54+
{{- end }}
5355
{{- if .Values.extraInitContainers }}
5456
{{ tpl .Values.extraInitContainers . | indent 6}}
5557
{{- end }}

0 commit comments

Comments
 (0)