diff --git a/library/common/Chart.yaml b/library/common/Chart.yaml index 7d2849b6..72f3beba 100644 --- a/library/common/Chart.yaml +++ b/library/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 16.2.21 +version: 16.2.22 diff --git a/library/common/templates/class/_ingress.tpl b/library/common/templates/class/_ingress.tpl index 4c465f00..36b63648 100644 --- a/library/common/templates/class/_ingress.tpl +++ b/library/common/templates/class/_ingress.tpl @@ -24,6 +24,12 @@ 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) }} + + {{/* 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 -}} --- apiVersion: networking.k8s.io/v1 kind: Ingress @@ -42,7 +48,7 @@ metadata: {{- end }} spec: {{- if $objectData.ingressClassName }} - ingressClassName: {{ tpl $objectData.ingressClassName $rootCtx }} + ingressClassName: {{ $ingressClassName }} {{- end }} rules: {{- range $h := $objectData.hosts }} diff --git a/library/common/templates/class/_service.tpl b/library/common/templates/class/_service.tpl index bd03ec37..1602e154 100644 --- a/library/common/templates/class/_service.tpl +++ b/library/common/templates/class/_service.tpl @@ -51,7 +51,13 @@ 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