@@ -36,17 +36,17 @@ spec:
3636 { {- with .statefulset.env } }
3737 { {- toYaml . | nindent 22 } }
3838 { {- end } }
39- { {- with .statefulset.customEnv } }
40- { {- toYaml . | nindent 22 } }
39+ { {- range $ k , $ v := .statefulset.customEnv } }
40+ { {- toYaml $ v | nindent 22 } }
4141 { {- end } }
4242 { {- end } }
4343 { {- if or .statefulset.envFrom .statefulset.customEnvFrom } }
4444 envFrom:
4545 { {- with .statefulset.envFrom } }
4646 { {- toYaml . | nindent 22 } }
4747 { {- end } }
48- { {- with .statefulset.customEnvFrom } }
49- { {- toYaml . | nindent 22 } }
48+ { {- range $ k , $ v := .statefulset.customEnvFrom } }
49+ { {- toYaml $ v | nindent 22 } }
5050 { {- end } }
5151 { {- end } }
5252 image: { { printf " %s:%s" .statefulset.image.repository (.statefulset.image.tag | toString) } }
6161 { {- with .statefulset.ports } }
6262 { {- toYaml . | nindent 22 } }
6363 { {- end } }
64- { {- with .statefulset.customPorts } }
65- { {- toYaml . | nindent 22 } }
64+ { {- range $ k , $ v := .statefulset.customPorts } }
65+ { {- toYaml $ v | nindent 22 } }
6666 { {- end } }
6767 { {- end } }
6868 { {- with .statefulset.readinessProbe } }
@@ -86,21 +86,21 @@ spec:
8686 { {- with .statefulset.volumeMounts } }
8787 { {- toYaml . | nindent 22 } }
8888 { {- end } }
89- { {- with .statefulset.customVolumeMounts } }
90- { {- toYaml . | nindent 22 } }
89+ { {- range $ k , $ v := .statefulset.customVolumeMounts } }
90+ { {- toYaml $ v | nindent 22 } }
9191 { {- end } }
9292 { {- end } }
9393 { {- if or .statefulset.pullSecrets .statefulset.customPullSecrets} }
9494 imagePullSecrets:
9595 { {- with .statefulset.pullSecrets } }
9696 { {- toYaml . | nindent 16 } }
9797 { {- end } }
98- { {- with .statefulset.customPullSecrets } }
99- { {- toYaml . | nindent 16 } }
98+ { {- range $ k , $ v := .statefulset.customPullSecrets } }
99+ { {- toYaml $ v | nindent 16 } }
100100 { {- end } }
101101 { {- end } }
102102 { {- if or .statefulset.initContainers .statefulset.customInitContainers } }
103- { {- $statefulset := .statefulset } }
103+ { {- $statefulset := merge .statefulset (dict " liferayname " ( include " liferay.name " .root)) } }
104104 initContainers:
105105 { {- range .statefulset.initContainers } }
106106 { {- if .containerTemplate } }
@@ -110,12 +110,12 @@ spec:
110110 { {- toYaml . | nindent 18 } }
111111 { {- end } }
112112 { {- end } }
113- { {- range .statefulset.customInitContainers } }
114- { {- if .containerTemplate } }
115- { {- tpl .containerTemplate $statefulset | nindent 16 } }
113+ { {- range $ k , $ v := .statefulset.customInitContainers } }
114+ { {- if $ v .containerTemplate } }
115+ { {- tpl $ v .containerTemplate $statefulset | nindent 16 } }
116116 { {- else } }
117117 - #
118- { {- toYaml . | nindent 18 } }
118+ { {- toYaml $ v | nindent 18 } }
119119 { {- end } }
120120 { {- end } }
121121 { {- end } }
@@ -141,8 +141,8 @@ spec:
141141 { {- with .statefulset.volumes } }
142142 { {- toYaml . | nindent 16 } }
143143 { {- end } }
144- { {- with .statefulset.customVolumes } }
145- { {- toYaml . | nindent 16 } }
144+ { {- range $ k , $ v := .statefulset.customVolumes } }
145+ { {- toYaml $ v | nindent 16 } }
146146 { {- end } }
147147 { {- end } }
148148 { {- with .statefulset.updateStrategy } }
@@ -154,8 +154,8 @@ spec:
154154 { {- with .statefulset.volumeClaimTemplates } }
155155 { {- toYaml . | nindent 8 } }
156156 { {- end } }
157- { {- with .statefulset.customVolumeClaimTemplates } }
158- { {- toYaml . | nindent 8 } }
157+ { {- range $ k , $ v := .statefulset.customVolumeClaimTemplates } }
158+ { {- toYaml $ v | nindent 8 } }
159159 { {- end } }
160160 { {- end } }
161161---
0 commit comments