feat(traefik-integration): actually default to false (#31868)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [x] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [x] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [x] ⚖️ My code follows the style guidelines of this project
- [x] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [x] 📄 I have made corresponding changes to the documentation
- [x] ⚠️ My changes generate no new warnings
- [x] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning
- [x] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):` or `chore(chart-name):`

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Stavros Kois
2025-02-09 21:04:03 +02:00
committed by GitHub
parent 56fb82e404
commit 41e5d6258f
7 changed files with 18 additions and 10 deletions
@@ -34,6 +34,7 @@ tests:
- path: /test-path
integrations:
traefik:
enabled: true
middlewares:
- name: my-compress
- name: some-existing-middleware-on-this-namespace
@@ -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:
@@ -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 -}}
@@ -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") -}}
@@ -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 -}}
+1
View File
@@ -388,6 +388,7 @@ words:
- whisparr
- xstar
- xsystems
- yeet
- zabbix
- zerotier
- zwavejs
@@ -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