From 40f3de3bfe7eed031df8adfb74025710ea37cf74 Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Sun, 10 Mar 2024 00:36:58 +0200 Subject: [PATCH] fix mutation bug that made order of defined hosts play a role on generation --- library/common/templates/class/_ingress.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/common/templates/class/_ingress.tpl b/library/common/templates/class/_ingress.tpl index c5d563e9..41be96a8 100644 --- a/library/common/templates/class/_ingress.tpl +++ b/library/common/templates/class/_ingress.tpl @@ -64,16 +64,16 @@ spec: {{- $_ := set $h "paths" (list (dict "path" "/")) -}} {{- end -}} {{- range $p := $h.paths -}} - {{- $svcData = (include "tc.v1.common.lib.ingress.backend.data" (dict + {{- $newSvcData := (include "tc.v1.common.lib.ingress.backend.data" (dict "rootCtx" $rootCtx "svcData" $svcData "override" $p.overrideService)) | fromYaml }} - path: {{ tpl ($p.path | default "/") $rootCtx }} pathType: {{ tpl ($p.pathType | default "Prefix") $rootCtx }} backend: service: - name: {{ $svcData.name }} + name: {{ $newSvcData.name }} port: - number: {{ $svcData.port }} + number: {{ $newSvcData.port }} {{- end -}} {{- end -}} {{/* If a certificateIssuer is defined in the whole ingress, use that */}}