From a60cbf0079a950516ff421c465d9c53ad4acbb6d Mon Sep 17 00:00:00 2001 From: Arnob kumar saha Date: Wed, 8 Jul 2026 16:30:10 +0600 Subject: [PATCH] Support hosted mode for gateway.domain helper When gatewayClass.annotations.mode is 'hosted', gateway.domain resolves to infra.host directly instead of the cluster/namespace-prefixed name. Signed-off-by: Arnob kumar saha --- charts/service-gateway/templates/_helpers.tpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/service-gateway/templates/_helpers.tpl b/charts/service-gateway/templates/_helpers.tpl index ad7f27450..9e910932c 100644 --- a/charts/service-gateway/templates/_helpers.tpl +++ b/charts/service-gateway/templates/_helpers.tpl @@ -62,10 +62,14 @@ The domain name used for the gateway. .. */}} {{- define "gateway.domain" -}} +{{- if eq (dig "mode" "" (.Values.gatewayClass.annotations | default dict)) "hosted" -}} +{{- .Values.infra.host -}} +{{- else -}} {{- $ns := trimSuffix "-gw" .Release.Namespace -}} {{- $useClusterName := or (eq $ns "ace") (eq .Values.infra.tenantSpreadPolicy "multi") -}} {{- $prefix := ternary (printf "%s.%s" .Values.clusterMetadata.name $ns) $ns $useClusterName -}} {{- printf "%s.%s" $prefix .Values.infra.host -}} +{{- end -}} {{- end }} {{/*