fix(traefik): remove duplicate `-Release.Name` when ingressClass is enabled (#9145)
**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** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ 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:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 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 **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ 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:
parent
040e87f8ec
commit
6709d8bf6e
|
@ -23,7 +23,7 @@ sources:
|
|||
- https://github.com/traefik/traefik-helm-chart
|
||||
- https://traefik.io/
|
||||
type: application
|
||||
version: 18.0.2
|
||||
version: 18.0.3
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- network
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: portalhook{{ if $.Values.ingressClass.enabled }}-{{ .Release.Name }}{{ end }}
|
||||
name: {{ ternary "portalhook" (printf "portalhook-%v" .Release.Name ) $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
data:
|
||||
{{- $ports := dict }}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
addPrefix:
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
{{- $values := .Values }}
|
||||
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}compress
|
||||
name: {{ ternary (printf "%v-compress" .Release.Name) "compress" $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
compress: {}
|
||||
|
@ -14,7 +13,7 @@ spec:
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}basic-ratelimit
|
||||
name: {{ ternary (printf "%v-basic-ratelimit" .Release.Name) "basic-ratelimit" $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
rateLimit:
|
||||
|
@ -24,7 +23,7 @@ spec:
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}basic-secure-headers
|
||||
name: {{ ternary (printf "%v-basic-secure-headers" .Release.Name) "basic-secure-headers" $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
headers:
|
||||
|
@ -49,11 +48,11 @@ spec:
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}chain-basic
|
||||
name: {{ ternary (printf "%v-chain-basic" .Release.Name) "chain-basic" $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
chain:
|
||||
middlewares:
|
||||
- name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}basic-ratelimit
|
||||
- name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}basic-secure-headers
|
||||
- name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}compress
|
||||
- name: {{ ternary (printf "%v-basic-ratelimit" .Release.Name) "basic-ratelimit" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-basic-secure-headers" .Release.Name) "basic-secure-headers" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-compress" .Release.Name) "compress" $.Values.ingressClass.enabled }}
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
{{ range $index, $middlewareData := .Values.middlewares.basicAuth }}
|
||||
---
|
||||
{{- $users := list }}
|
||||
{{ range $index, $userdata := $middlewareData.users }}
|
||||
{{ $users = append $users ( htpasswd $userdata.username $userdata.password ) }}
|
||||
{{ end }}
|
||||
{{- range $index, $userdata := $middlewareData.users }}
|
||||
{{- $users = append $users (htpasswd $userdata.username $userdata.password) }}
|
||||
{{- end }}
|
||||
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
|
@ -23,7 +23,7 @@ stringData:
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
basicAuth:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
chain:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
forwardAuth:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
plugin:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
ipWhiteList:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
rateLimit:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
plugin:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
redirectScheme:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
redirectRegex:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
stripPrefixRegex:
|
||||
|
|
|
@ -4,23 +4,23 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-opencors-chain
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name "tc-opencors-chain") "tc-opencors-chain" $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
chain:
|
||||
middlewares:
|
||||
- name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}basic-ratelimit
|
||||
- name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-opencors-headers
|
||||
- name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}compress
|
||||
- name: {{ ternary (printf "%v-%v" .Release.Name "basic-ratelimit") "basic-ratelimit" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-%v" .Release.Name "tc-opencors-headers") "tc-opencors-headers" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-%v" .Release.Name "compress") "compress" $.Values.ingressClass.enabled }}
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-closedcors-chain
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name "tc-closedcors-chain") "tc-closedcors-chain" $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
chain:
|
||||
middlewares:
|
||||
- name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}basic-ratelimit
|
||||
- name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-closedcors-headers
|
||||
- name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}compress
|
||||
- name: {{ ternary (printf "%v-%v" .Release.Name "basic-ratelimit") "basic-ratelimit" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-%v" .Release.Name "tc-closedcors-headers") "tc-closedcors-headers" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-%v" .Release.Name "compress") "compress" $.Values.ingressClass.enabled }}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-opencors-headers
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name "tc-opencors-headers") "tc-opencors-headers" $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
headers:
|
||||
|
@ -34,7 +34,7 @@ spec:
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-closedcors-headers
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name "tc-closedcors-headers") "tc-closedcors-headers" $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
headers:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-nextcloud-redirectregex-dav
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name "tc-nextcloud-redirectregex-dav") "tc-nextcloud-redirectregex-dav" $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
redirectRegex:
|
||||
|
@ -14,9 +14,9 @@ spec:
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-nextcloud-chain
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name "tc-nextcloud-chain") "tc-nextcloud-chain" $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
chain:
|
||||
middlewares:
|
||||
- name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-nextcloud-redirectregex-dav
|
||||
- name: {{ ternary (printf "%v-%v" .Release.Name "tc-nextcloud-redirectregex-dav") "tc-nextcloud-redirectregex-dav" $.Values.ingressClass.enabled }}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
plugin:
|
||||
|
|
Loading…
Reference in New Issue