fix(traefik): ensure ingressclass state is fetched from global scope
This commit is contained in:
parent
eb5e234437
commit
023e095d78
|
@ -23,7 +23,7 @@ sources:
|
|||
- https://github.com/traefik/traefik-helm-chart
|
||||
- https://traefik.io/
|
||||
type: application
|
||||
version: 18.0.0
|
||||
version: 18.0.1
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- network
|
||||
|
|
|
@ -67,7 +67,7 @@ args:
|
|||
- "--providers.kubernetesingress.namespaces={{ template "providers.kubernetesIngress.namespaces" . }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingressClass.enabled }}
|
||||
{{- if $.Values.ingressClass.enabled }}
|
||||
- "--providers.kubernetesingress.ingressclass={{ .Release.Name }}"
|
||||
{{- end }}
|
||||
{{- range $entrypoint, $config := $ports }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{/* Define the ingressClass */}}
|
||||
{{- define "traefik.ingressClass" -}}
|
||||
---
|
||||
{{ if .Values.ingressClass.enabled }}
|
||||
{{ if $.Values.ingressClass.enabled }}
|
||||
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/IngressClass" }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/IngressClass" }}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: portalhook{{ if .Values.ingressClass.enabled }}-{{ .Release.Name }}{{ end }}
|
||||
name: portalhook{{ if $.Values.ingressClass.enabled }}-{{ .Release.Name }}{{ end }}
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
addPrefix:
|
||||
|
|
|
@ -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 }}compress
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}compress
|
||||
namespace: tc-system
|
||||
spec:
|
||||
compress: {}
|
||||
|
@ -14,7 +14,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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}basic-ratelimit
|
||||
namespace: tc-system
|
||||
spec:
|
||||
rateLimit:
|
||||
|
@ -24,7 +24,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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}basic-secure-headers
|
||||
namespace: tc-system
|
||||
spec:
|
||||
headers:
|
||||
|
@ -49,11 +49,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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}chain-basic
|
||||
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: {{ 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
|
||||
|
|
|
@ -23,7 +23,7 @@ stringData:
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if .Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
basicAuth:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{- $values := .Values }}
|
||||
{{- $namespace := "tc-system" }}
|
||||
{{- if .Values.ingressClass.enabled }}
|
||||
{{- if $.Values.ingressClass.enabled }}
|
||||
{{- $namespace := ( printf "tc-system-%s" .Release.Name ) }}
|
||||
{{- end }}
|
||||
{{ range $index, $middlewareData := .Values.middlewares.chain }}
|
||||
|
@ -10,7 +10,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if .Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
stripPrefixRegex:
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-opencors-chain
|
||||
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: {{ 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
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
|
@ -21,6 +21,6 @@ metadata:
|
|||
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: {{ 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
|
||||
|
|
|
@ -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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-opencors-headers
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-closedcors-headers
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-nextcloud-redirectregex-dav
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-nextcloud-chain
|
||||
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: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}tc-nextcloud-redirectregex-dav
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ if .Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
name: {{ if $.Values.ingressClass.enabled }}{{ .Release.Name }}-{{ end }}{{ $middlewareData.name }}
|
||||
namespace: tc-system
|
||||
spec:
|
||||
plugin:
|
||||
|
|
Loading…
Reference in New Issue