aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordemskeq8 <alexander.dehn@highstreet-technologies.com>2023-08-22 09:06:10 +0000
committerdemskeq8 <alexander.dehn@highstreet-technologies.com>2023-08-22 09:37:12 +0000
commit7284be8ba0d7a77261542cd111d79e4e4ab1c4db (patch)
tree9a3d04b90b5a785f20e3fbc817da4a72817ad75b
parentffd944b874af386000d157e58be0475561021340 (diff)
[COMMON] Rendering issue of templ common.nginxIngress for sub-components
Fix context handling for templates common.nginxIngress and ingress.config.port Issue-ID: OOM-3237 Change-Id: Idabcdf8ca564d60e2d2471c7fde38412dc478b50 Signed-off-by: demskeq8 <alexander.dehn@highstreet-technologies.com>
-rw-r--r--kubernetes/common/common/templates/_ingress.tpl8
1 files changed, 4 insertions, 4 deletions
diff --git a/kubernetes/common/common/templates/_ingress.tpl b/kubernetes/common/common/templates/_ingress.tpl
index 968cb65a78..c469bc7c7e 100644
--- a/kubernetes/common/common/templates/_ingress.tpl
+++ b/kubernetes/common/common/templates/_ingress.tpl
@@ -305,7 +305,7 @@ true
*/}}
{{- define "ingress.config.port" -}}
{{- $dot := default . .dot -}}
-{{ range .Values.ingress.service }}
+{{ range $dot.Values.ingress.service }}
{{- $baseaddr := (required "'baseaddr' param, set to the specific part of the fqdn, is required." .baseaddr) }}
- host: {{ include "ingress.config.host" (dict "dot" $dot "baseaddr" $baseaddr) }}
http:
@@ -719,7 +719,7 @@ spec:
{{- define "common.nginxIngress" -}}
{{- $dot := default . .dot -}}
{{ range $dot.Values.ingress.service }}
-{{ if eq (include "common.ingress._protocol" (dict "dot" .)) "http" }}
+{{ if eq (include "common.ingress._protocol" (dict "dot" $dot)) "http" }}
{{ $baseaddr := required "baseaddr" .baseaddr }}
apiVersion: networking.k8s.io/v1
kind: Ingress
@@ -734,7 +734,7 @@ metadata:
heritage: {{ $dot.Release.Service }}
spec:
rules:
- {{ include "ingress.config.port" . | trim }}
+ {{ include "ingress.config.port" $dot | trim }}
{{- if $dot.Values.ingress.tls }}
tls:
{{ toYaml $dot.Values.ingress.tls | indent 4 }}
@@ -743,7 +743,7 @@ spec:
{{- if $dot.Values.ingress.config.tls }}
tls:
- hosts:
- - {{ include "ingress.config.host" (dict "dot" . "baseaddr" $baseaddr) }}
+ - {{ include "ingress.config.host" (dict "dot" $dot "baseaddr" $baseaddr) }}
secretName: {{ required "secret" (tpl (default "" $dot.Values.ingress.config.tls.secret) $dot) }}
{{- end }}
{{- end }}