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 }}