From b5db44775d0d6d8eb0016e249cbe73fa1dd0fbf7 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Sun, 4 Jul 2021 13:05:43 +0200 Subject: [PATCH] try fixing probes a bit (#653) * try fixing probes a bit * port kah probe changes --- charts/library/common/Chart.yaml | 2 +- charts/library/common/templates/lib/controller/_probes.tpl | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index 83398ac1e8a..c1c01131148 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -18,4 +18,4 @@ maintainers: name: common sources: type: library -version: 6.5.0 +version: 6.5.1 diff --git a/charts/library/common/templates/lib/controller/_probes.tpl b/charts/library/common/templates/lib/controller/_probes.tpl index 4222d3c97ed..59583e8da96 100644 --- a/charts/library/common/templates/lib/controller/_probes.tpl +++ b/charts/library/common/templates/lib/controller/_probes.tpl @@ -11,6 +11,7 @@ Probes selection logic. {{- range $probeName, $probe := .Values.probes }} {{- if $probe.enabled -}} + {{- $probeType = "TCP" -}} {{- "" | nindent 0 }} {{- $probeName }}Probe: {{- if $probe.custom -}} @@ -33,7 +34,11 @@ Probes selection logic. {{- "tcpSocket:" | nindent 2 }} {{- end }} - {{- printf "port: %v" $primaryPort.port | nindent 4 }} + {{- if $primaryPort.targetPort }} + {{- printf "port: %v" $primaryPort.targetPort | nindent 4 }} + {{- else}} + {{- printf "port: %v" $primaryPort.port | nindent 4 }} + {{- end }} {{- printf "initialDelaySeconds: %v" $probe.spec.initialDelaySeconds | nindent 2 }} {{- printf "failureThreshold: %v" $probe.spec.failureThreshold | nindent 2 }} {{- printf "timeoutSeconds: %v" $probe.spec.timeoutSeconds | nindent 2 }}