File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,6 @@ spec:
118
118
{{- end }}
119
119
terminationGracePeriodSeconds : 60
120
120
{{- if .Values.defaultBackend.extraVolumes }}
121
- volumes : {{ toYaml .Values.defaultBackend.extraVolumes | nindent 8 }}
121
+ volumes : {{ tpl ( toYaml .Values.defaultBackend.extraVolumes) $ | nindent 8 }}
122
122
{{- end }}
123
123
{{- end }}
Original file line number Diff line number Diff line change @@ -196,3 +196,26 @@ tests:
196
196
- equal :
197
197
path : spec.template.spec.automountServiceAccountToken
198
198
value : false
199
+
200
+ - it : should create a Deployment with extra volumes if `defaultBackend.extraVolumes` is set
201
+ set :
202
+ defaultBackend.enabled : true
203
+ defaultBackend.extraVolumes :
204
+ - name : extra-volume
205
+ configMap :
206
+ name : ' {{ .Release.Name }}'
207
+ defaultBackend.extraVolumeMounts :
208
+ - name : extra-volume
209
+ mountPath : /extra
210
+ asserts :
211
+ - equal :
212
+ path : spec.template.spec.volumes
213
+ value :
214
+ - name : extra-volume
215
+ configMap :
216
+ name : RELEASE-NAME
217
+ - equal :
218
+ path : spec.template.spec.containers[0].volumeMounts
219
+ value :
220
+ - name : extra-volume
221
+ mountPath : /extra
You can’t perform that action at this time.
0 commit comments