@@ -92,12 +92,16 @@ spec:
9292 ports :
9393 - containerPort : {{ $container.port | default (add $root.Values.service.port $idx) }}
9494 name : {{ $container.portName | default (tpl $container.name $root) }}
95- {{- if or $root.Values.data.enable $root.Values.mounts.data $root.Values.mounts.home $root.Values.mounts.roDir $root.Values.mounts.rwDir $root.Values.mounts.socket $root.Values.mounts.roFile }}
95+ {{- if or $root.Values.data.enable $root.Values.mounts.emptyDir $root.Values.mounts. data $root.Values.mounts.home $root.Values.mounts.roDir $root.Values.mounts.rwDir $root.Values.mounts.socket $root.Values.mounts.roFile }}
9696 volumeMounts :
9797 {{- if $root.Values.data.enable }}
9898 - name : data
9999 mountPath : {{ $root.Values.data.path }}
100100 {{- end }}
101+ {{- range $name, $path := $root.Values.mounts.emptyDir }}
102+ - name : {{ $name }}
103+ mountPath : {{ tpl $path $root }}
104+ {{- end }}
101105 {{- if $root.Values.mounts.data }}
102106 - name : {{ $root.Values.mounts.data.name }}
103107 mountPath : {{ tpl $root.Values.mounts.data.mountPath $root }}
@@ -207,12 +211,16 @@ spec:
207211 value : {{ tpl $initEnv.value $ | quote }}
208212 {{- end }}
209213 {{- end }}
210- {{- if or $.Values.data.enable $.Values.mounts.data $.Values.mounts.home $.Values.mounts.roDir $.Values.mounts.rwDir $.Values.mounts.socket $.Values.mounts.roFile }}
214+ {{- if or $.Values.data.enable $.Values.mounts.emptyDir $.Values.mounts. data $.Values.mounts.home $.Values.mounts.roDir $.Values.mounts.rwDir $.Values.mounts.socket $.Values.mounts.roFile }}
211215 volumeMounts :
212216 {{- if $.Values.data.enable }}
213217 - name : data
214218 mountPath : {{ $.Values.data.path }}
215219 {{- end }}
220+ {{- range $name, $path := $.Values.mounts.emptyDir }}
221+ - name : {{ $name }}
222+ mountPath : {{ tpl $path $ }}
223+ {{- end }}
216224 {{- if $.Values.mounts.data }}
217225 - name : data
218226 mountPath : {{ tpl $.Values.mounts.data.mountPath $ }}
@@ -242,7 +250,11 @@ spec:
242250 {{- end }}
243251 {{- end }}
244252 {{- if $init.mounts }}
245- {{- if or $init.mounts.data $init.mounts.home $init.mounts.roDir $init.mounts.rwDir $init.mounts.socket $init.mounts.roFile }}
253+ {{- if or $init.mounts.emptyDir $init.mounts.data $init.mounts.home $init.mounts.roDir $init.mounts.rwDir $init.mounts.socket $init.mounts.roFile }}
254+ {{- range $name, $path := $init.mounts.emptyDir }}
255+ - name : {{ $name }}
256+ mountPath : {{ tpl $path $ }}
257+ {{- end }}
246258 {{- if $init.mounts.data }}
247259 - name : {{ $init.mounts.data.name }}
248260 mountPath : {{ tpl $init.mounts.data.mountPath $ }}
@@ -288,13 +300,17 @@ spec:
288300 {{- with .Values.nodeSelector }}
289301 {{- toYaml . | nindent 8 }}
290302 {{- end }}
291- {{- if or .Values.data.enable .Values.mounts.data .Values.mounts.home .Values.mounts.roDir .Values.mounts.rwDir .Values.mounts.socket .Values.mounts.roFile }}
303+ {{- if or .Values.data.enable .Values.mounts.emptyDir .Values.mounts. data .Values.mounts.home .Values.mounts.roDir .Values.mounts.rwDir .Values.mounts.socket .Values.mounts.roFile }}
292304 volumes :
293305 {{- if .Values.data.enable }}
294306 - name : data
295307 persistentVolumeClaim :
296308 claimName : {{ include "webservice.data.name" . }}
297309 {{- end }}
310+ {{- range $name, $path := .Values.mounts.emptyDir }}
311+ - name : {{ $name }}
312+ emptyDir : {}
313+ {{- end }}
298314 {{- if .Values.mounts.data }}
299315 - name : {{ .Values.mounts.data.name }}
300316 hostPath :
0 commit comments