From e4944a7fa2a4e9751db4dfc826953f967fbeb7c4 Mon Sep 17 00:00:00 2001 From: Mithun Kumar Date: Sun, 16 Jun 2024 23:14:47 +0530 Subject: [PATCH] fix(helpers) KONG_PORT_MAPS value for tls overrideServiceTarget port --- charts/kong/templates/_helpers.tpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/kong/templates/_helpers.tpl b/charts/kong/templates/_helpers.tpl index 9cedca7bd..2ea398ab4 100644 --- a/charts/kong/templates/_helpers.tpl +++ b/charts/kong/templates/_helpers.tpl @@ -337,8 +337,12 @@ Parameters: takes a service (e.g. .Values.proxy) as its argument and returns KON {{- end -}} {{- if .tls.enabled -}} + {{- if .tls.overrideServiceTargetPort -}} + {{- $portMaps = append $portMaps (printf "%d:%d" (int64 .tls.servicePort) (int64 .tls.overrideServiceTargetPort)) -}} + {{- else -}} {{- $portMaps = append $portMaps (printf "%d:%d" (int64 .tls.servicePort) (int64 .tls.containerPort)) -}} {{- end -}} + {{- end -}} {{- $portMapsString := ($portMaps | join ", ") -}} {{- $portMapsString -}}