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