diff --git a/charts/library/common-test/tests/ingress/traefik_test.yaml b/charts/library/common-test/tests/ingress/traefik_test.yaml index 9967e416baa..4d32a0d2759 100644 --- a/charts/library/common-test/tests/ingress/traefik_test.yaml +++ b/charts/library/common-test/tests/ingress/traefik_test.yaml @@ -34,6 +34,7 @@ tests: - path: /test-path integrations: traefik: + enabled: true middlewares: - name: my-compress - name: some-existing-middleware-on-this-namespace diff --git a/charts/library/common-test/tests/traefik/enabled_test.yaml b/charts/library/common-test/tests/traefik/enabled_test.yaml index 3a84d35e8e5..d8b39f10e35 100644 --- a/charts/library/common-test/tests/traefik/enabled_test.yaml +++ b/charts/library/common-test/tests/traefik/enabled_test.yaml @@ -38,6 +38,9 @@ tests: primary: true hosts: - host: chart-example.local + integrations: + traefik: + enabled: true asserts: - hasDocuments: count: 3 @@ -100,6 +103,7 @@ tests: primary: true integrations: traefik: + enabled: true chartMiddlewares: - name: some-chart-middleware hosts: @@ -146,6 +150,7 @@ tests: primary: true integrations: traefik: + enabled: true middlewares: - name: some-user-middleware hosts: diff --git a/charts/library/common/templates/class/_ingress.tpl b/charts/library/common/templates/class/_ingress.tpl index 2125528b26e..1b5969395f2 100644 --- a/charts/library/common/templates/class/_ingress.tpl +++ b/charts/library/common/templates/class/_ingress.tpl @@ -39,8 +39,10 @@ objectData: The object data to be used to render the Ingress. {{- end -}} {{- end -}} - {{/* When Stop All is set, force ingressClass "stopped" - to yeet ingress from the ingresscontroller */}} + {{/* + When Stop All is set, force ingressClass "stopped" + to yeet ingress from the ingressController + */}} {{- if (include "tc.v1.common.lib.util.stopAll" $rootCtx) -}} {{- $ingressClassName = "tc-stopped" -}} {{- end -}} diff --git a/charts/library/common/templates/lib/ingress/integrations/_traefik.tpl b/charts/library/common/templates/lib/ingress/integrations/_traefik.tpl index e71b4e42dd2..41ecb6fc564 100644 --- a/charts/library/common/templates/lib/ingress/integrations/_traefik.tpl +++ b/charts/library/common/templates/lib/ingress/integrations/_traefik.tpl @@ -9,13 +9,12 @@ {{- end -}} {{- $traefik := $objectData.integrations.traefik -}} - - {{- $enabled := true -}} - {{- if and $traefik (hasKey $traefik "enabled") (kindIs "bool" $traefik.enabled) -}} - {{- $enabled = $traefik.enabled -}} + {{- $enabled := "false" -}} + {{- if and (hasKey $traefik "enabled") (kindIs "bool" $traefik.enabled) -}} + {{- $enabled = $traefik.enabled | toString -}} {{- end -}} - {{- if $enabled -}} + {{- if eq $enabled "true" -}} {{- include "tc.v1.common.lib.ingress.integration.traefik.validate" (dict "objectData" $objectData) -}} {{- $namespace := include "tc.v1.common.lib.metadata.namespace" (dict "rootCtx" $rootCtx "objectData" $objectData "caller" "Traefik Integration") -}} diff --git a/charts/library/common/templates/spawner/traefik/_middleware.tpl b/charts/library/common/templates/spawner/traefik/_middleware.tpl index af8669c30f5..e45a926817a 100644 --- a/charts/library/common/templates/spawner/traefik/_middleware.tpl +++ b/charts/library/common/templates/spawner/traefik/_middleware.tpl @@ -30,7 +30,7 @@ {{- $_ := set $ing.integrations "traefik" dict -}} {{- end -}} {{- $traefik := $ing.integrations.traefik -}} - {{- $enabledTraefikIntegration := "true" -}} + {{- $enabledTraefikIntegration := "false" -}} {{- if and (hasKey $traefik "enabled") (kindIs "bool" $traefik.enabled) -}} {{- $enabledTraefikIntegration = $traefik.enabled | toString -}} {{- end -}} diff --git a/cspell.config.yaml b/cspell.config.yaml index 49a3896e3ad..16460cecbbb 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -388,6 +388,7 @@ words: - whisparr - xstar - xsystems + - yeet - zabbix - zerotier - zwavejs diff --git a/website/src/content/docs/common/ingress/traefik.md b/website/src/content/docs/common/ingress/traefik.md index 37772262291..b11fbd0b9aa 100644 --- a/website/src/content/docs/common/ingress/traefik.md +++ b/website/src/content/docs/common/ingress/traefik.md @@ -29,9 +29,9 @@ Enables or Disables the traefik integration | ---------- | -------------------------------------------- | | Key | `ingress.$name.integrations.traefik.enabled` | | Type | `bool` | -| Required | ✅ | +| Required | ❌ | | Helm `tpl` | ❌ | -| Default | `true` | +| Default | `false` | Example