diff --git a/library/common/templates/class/_ingress.tpl b/library/common/templates/class/_ingress.tpl index 36b63648..39637b57 100644 --- a/library/common/templates/class/_ingress.tpl +++ b/library/common/templates/class/_ingress.tpl @@ -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: diff --git a/library/common/templates/class/_service.tpl b/library/common/templates/class/_service.tpl index 1602e154..d1068478 100644 --- a/library/common/templates/class/_service.tpl +++ b/library/common/templates/class/_service.tpl @@ -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