Skip to content

Commit b803bc8

Browse files
ace-gw should always have clusterName in the domain (#1234)
Signed-off-by: Arnob kumar saha <arnob@appscode.com>
1 parent 31209e8 commit b803bc8

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

charts/service-gateway/templates/_helpers.tpl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,13 @@ The name of the tenant.
5959

6060
{{/*
6161
The domain name used for the gateway.
62+
<clusterName>.<orgName / "ace">.<domain>
6263
*/}}
6364
{{- define "gateway.domain" -}}
64-
{{- ternary
65-
(printf "%s.%s.%s" (trimSuffix "-gw" .Release.Namespace) .Values.clusterMetadata.name .Values.infra.host)
66-
(printf "%s.%s" (trimSuffix "-gw" .Release.Namespace) .Values.infra.host)
67-
(eq .Values.infra.tenantSpreadPolicy "multi") }}
65+
{{- $ns := trimSuffix "-gw" .Release.Namespace -}}
66+
{{- $useClusterName := or (eq $ns "ace") (eq .Values.infra.tenantSpreadPolicy "multi") -}}
67+
{{- $prefix := ternary (printf "%s.%s" .Values.clusterMetadata.name $ns) $ns $useClusterName -}}
68+
{{- printf "%s.%s" $prefix .Values.infra.host -}}
6869
{{- end }}
6970

7071
{{/*

0 commit comments

Comments
 (0)