summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucjan Bryndza <l.bryndza@samsung.com>2020-05-12 09:26:32 +0000
committerKrzysztof Opasiak <k.opasiak@samsung.com>2020-05-15 02:44:11 +0200
commit84767148fb032832adfe4b85f2b6bcf311525bdb (patch)
tree6b64ce9d00457fcb2e128fc9117bdfbad4286abd
parenteed1fc5b5a55fc75935edda30cdee84542fedb4c (diff)
Fix missing template arguments
Fix missing template arguments for robot template ingress script Issue-ID: OOM-2341 Change-Id: I93386cc010830cad3e9a05875f18d01c0a01b0e5 Signed-off-by: Lucjan Bryndza <l.bryndza@samsung.com>
-rw-r--r--templates/_ingress_svc_hostname.tpl24
1 files changed, 16 insertions, 8 deletions
diff --git a/templates/_ingress_svc_hostname.tpl b/templates/_ingress_svc_hostname.tpl
index 472c121..160bfbf 100644
--- a/templates/_ingress_svc_hostname.tpl
+++ b/templates/_ingress_svc_hostname.tpl
@@ -28,16 +28,24 @@
{{- define "robot.ingress.svchost._isen" -}}
{{- $key := .key -}}
{{- $master := .parent.Values.config.useIngressHost -}}
- {{- if hasKey $master $key -}}
- {{- $en_parent := (index $master $key) -}}
- {{- if hasKey $en_parent "enabled" -}}
- {{- default "" (index $en_parent "enabled") -}}
- {{- else -}}
- {{- "" -}}
- {{- end -}}
+ {{- if hasKey $master "enabled" -}}
+ {{- if (index $master "enabled") -}}
+ {{- if hasKey $master $key -}}
+ {{- $en_parent := (index $master $key) -}}
+ {{- if hasKey $en_parent "enabled" -}}
+ {{- default "" (index $en_parent "enabled") -}}
+ {{- else -}}
+ {{- "" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- "" -}}
+ {{- end -}}
{{- else -}}
{{- "" -}}
{{- end -}}
+ {{- else -}}
+ {{- "" -}}
+ {{- end -}}
{{- end -}}
{{/*
@@ -111,7 +119,7 @@
{{- if .root.Values.global.ingress -}}
{{- if .root.Values.global.ingress.virtualhost -}}
{{- $domain := .root.Values.global.ingress.virtualhost.baseurl -}}
- {{- $ihostname := default $hostname (include "robot.ingress.svchost._inghost") -}}
+ {{- $ihostname := default $hostname (include "robot.ingress.svchost._inghost" (dict "parent" .root "key" $tplhname)) -}}
{{- printf "%s.%s" $ihostname $domain -}}
{{- end -}}
{{- end -}}