From a712ab45e4e27a4ad1a7ddfdea3d7589e55eeef0 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 25 Oct 2023 17:31:15 +0200 Subject: [PATCH] fix(helm): return nginx port as string Signed-off-by: rjshrjndrn --- scripts/helmcharts/openreplay/templates/_helpers.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/helmcharts/openreplay/templates/_helpers.tpl b/scripts/helmcharts/openreplay/templates/_helpers.tpl index 4f2a9ca1b..0da826690 100644 --- a/scripts/helmcharts/openreplay/templates/_helpers.tpl +++ b/scripts/helmcharts/openreplay/templates/_helpers.tpl @@ -8,11 +8,11 @@ Expand the name of the chart. {{/* Get domain name with/without port */}} {{- define "openreplay.domainURL" -}} {{- $scheme := ternary "https" "http" .Values.global.ORSecureAccess -}} -{{- $port := ternary .Values.global.ingress.controller.service.ports.https .Values.global.ingress.controller.service.ports.http .Values.global.ORSecureAccess -}} -{{- if or (eq (toString $port) "80") (eq (toString $port) "443") -}} +{{- $port := toString (ternary .Values.global.ingress.controller.service.ports.https .Values.global.ingress.controller.service.ports.http .Values.global.ORSecureAccess) -}} +{{- if or (eq $port "80") (eq $port "443") -}} {{- printf "%s://%s" $scheme .Values.global.domainName -}} {{- else -}} -{{- printf "%s://%s:%d" $scheme .Values.global.domainName $port -}} +{{- printf "%s://%s:%s" $scheme .Values.global.domainName $port -}} {{- end -}} {{- end -}}