use correct var in ingress

This commit is contained in:
Stavros kois
2023-12-24 22:43:41 +02:00
parent edf4b7f96c
commit 5619225d97
2 changed files with 5 additions and 7 deletions

View File

@@ -23,13 +23,13 @@ objectData: The object data to be used to render the Ingress.
{{- include "tc.v1.common.lib.ingress.integration.certManager" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
{{- include "tc.v1.common.lib.ingress.integration.traefik" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
{{- include "tc.v1.common.lib.ingress.integration.homepage" (dict "rootCtx" $rootCtx "objectData" $objectData) }}
{{- include "tc.v1.common.lib.ingress.integration.homepage" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
{{/* When Stop All is set, force ingressClass "stopped" to yeet ingress from the ingresscontroller */}}
{{- $ingressClassName := (tpl $objectData.ingressClassName $rootCtx) -}}
{{- if (include "tc.v1.common.lib.util.stopAll" $rootCtx) -}}
{{- $ingressClassName = "stopped" -}}
{{- end -}}
{{- end }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
@@ -47,7 +47,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- if $objectData.ingressClassName }}
{{- if $ingressClassName }}
ingressClassName: {{ $ingressClassName }}
{{- end }}
rules:

View File

@@ -51,14 +51,12 @@ objectData: The service data, that will be used to render the Service object.
{{- $svcType = "ClusterIP" -}}
{{- end -}}
{{- end -}}
{{/* When Stop All is set, force ClusterIP as well */}}
{{- if (include "tc.v1.common.lib.util.stopAll" $rootCtx) -}}
{{- $svcType = "ClusterIP" -}}
{{- end -}}
{{- $_ := set $objectData "type" $svcType }}
---
apiVersion: v1
kind: Service