Skip to content

Commit 1548baa

Browse files
Support hosted mode for gateway.domain helper (#1293)
Signed-off-by: Arnob kumar saha <arnob@appscode.com>
1 parent 0deb537 commit 1548baa

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

charts/service-gateway/templates/_helpers.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,14 @@ The domain name used for the gateway.
6262
<clusterName>.<orgName / "ace">.<domain>
6363
*/}}
6464
{{- define "gateway.domain" -}}
65+
{{- if eq (dig "mode" "" (.Values.gatewayClass.annotations | default dict)) "hosted" -}}
66+
{{- .Values.infra.host -}}
67+
{{- else -}}
6568
{{- $ns := trimSuffix "-gw" .Release.Namespace -}}
6669
{{- $useClusterName := or (eq $ns "ace") (eq .Values.infra.tenantSpreadPolicy "multi") -}}
6770
{{- $prefix := ternary (printf "%s.%s" .Values.clusterMetadata.name $ns) $ns $useClusterName -}}
6871
{{- printf "%s.%s" $prefix .Values.infra.host -}}
72+
{{- end -}}
6973
{{- end }}
7074

7175
{{/*

0 commit comments

Comments
 (0)