@@ -159,6 +159,7 @@ spec:
159159 App containers
160160 */}}
161161 {{- range $containerName, $containerConfig := $containers }}
162+ {{- $portName := include "mozcloud.portName" $containerName }}
162163 - name : {{ $containerName }}
163164 {{- /*
164165 We first look for an image and tag in the container config YAML. If
@@ -227,7 +228,7 @@ spec:
227228 (($containerConfig.healthCheck).liveness).enabled
228229 }}
229230 ports :
230- - name : {{ $containerName }}
231+ - name : {{ $portName }}
231232 containerPort : {{ $containerConfig.port }}
232233 {{- end }}
233234 {{- if (dig "healthCheck" "liveness" "enabled" true $containerConfig) }}
@@ -247,7 +248,7 @@ spec:
247248 {{- end }}
248249 {{- end }}
249250 path : {{ default "/__lbheartbeat__" $containerConfig.healthCheck.liveness.path }}
250- port : {{ $containerName }}
251+ port : {{ $portName }}
251252 {{- /* If liveness probe settings are defined, use those */}}
252253 {{- if (($containerConfig.healthCheck).liveness).probes }}
253254 {{- range $k, $v := $containerConfig.healthCheck.liveness.probes }}
@@ -271,7 +272,7 @@ spec:
271272 {{- end }}
272273 {{- end }}
273274 path : {{ default "/__lbheartbeat__" $containerConfig.healthCheck.readiness.path }}
274- port : {{ $containerName }}
275+ port : {{ $portName }}
275276 {{- if (($containerConfig.healthCheck).readiness).probes }}
276277 {{- range $k, $v := $containerConfig.healthCheck.readiness.probes }}
277278 {{ $k }}: {{ $v }}
@@ -311,6 +312,7 @@ spec:
311312 {{- if $initContainers }}
312313 initContainers :
313314 {{- range $containerName, $containerConfig := $initContainers }}
315+ {{- $portName := include "mozcloud.portName" $containerName }}
314316 - name : {{ $containerName }}
315317 {{- /*
316318 We first look for an image and tag in the container config YAML. If
@@ -371,7 +373,7 @@ spec:
371373 (($containerConfig.healthCheck).liveness).enabled
372374 }}
373375 ports :
374- - name : {{ $containerName }}
376+ - name : {{ $portName }}
375377 containerPort : {{ $containerConfig.port }}
376378 {{- end }}
377379 resources :
0 commit comments