Skip to content

Commit aa075bd

Browse files
Fix nil pointer on global.platform.host in gateway TLS cert
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
1 parent 5c6f99e commit aa075bd

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

charts/service-gateway/templates/gateway-tls/certificate.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ spec:
3131
{{- if eq .Values.infra.hostType "domain" }}
3232
dnsNames:
3333
- {{ include "gateway.domain" . }}
34-
{{- if and (eq (dig "mode" "" (.Values.gatewayClass.annotations | default dict)) "hosted") (eq .Values.global.platform.host "appscode.com") }}
35-
- "nats.{{ .Values.global.platform.host }}"
36-
- "api.{{ .Values.global.platform.host }}"
34+
{{- $platformHost := dig "platform" "host" "" (.Values.global | default dict) }}
35+
{{- if and (eq (dig "mode" "" (.Values.gatewayClass.annotations | default dict)) "hosted") (eq $platformHost "appscode.com") }}
36+
- "nats.{{ $platformHost }}"
37+
- "api.{{ $platformHost }}"
3738
- "api.byte.builders"
3839
{{- end }}
3940
commonName: {{ include "gateway.domain" . }}

0 commit comments

Comments
 (0)