From 28d372ab210e4bf053b1dd49dfed443096959000 Mon Sep 17 00:00:00 2001 From: Krzysztof Opasiak Date: Wed, 9 Sep 2020 13:14:27 +0200 Subject: [Tree-Wide] Reference ports by name not index Referencing anything based on its position on alist can be really fragile and har to debug. As we already have a convenience template that allows us to access the port based on its name let's make sure that everyone is using it. Issue-ID: OOM-1971 Signed-off-by: Krzysztof Opasiak Change-Id: Id25cb9d9e48f39f46786ea9e9a432b0c51130c50 --- .../dcaemod/components/dcaemod-healthcheck/templates/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kubernetes/dcaemod/components/dcaemod-healthcheck/templates') diff --git a/kubernetes/dcaemod/components/dcaemod-healthcheck/templates/deployment.yaml b/kubernetes/dcaemod/components/dcaemod-healthcheck/templates/deployment.yaml index 64268abb33..28d974c815 100644 --- a/kubernetes/dcaemod/components/dcaemod-healthcheck/templates/deployment.yaml +++ b/kubernetes/dcaemod/components/dcaemod-healthcheck/templates/deployment.yaml @@ -36,13 +36,13 @@ spec: {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: - port: {{ ( index .Values.service.ports 0).port }} + port: {{ include "common.getPort" (dict "global" . "name" "http") }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end -}} readinessProbe: tcpSocket: - port: {{ ( index .Values.service.ports 0).port }} + port: {{ include "common.getPort" (dict "global" . "name" "http") }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} volumeMounts: -- cgit 1.2.3-korg