2021-09-03 17:34:31 +00:00
|
|
|
{{- $values := $values }}
|
|
|
|
{{- $namespace := {{ if or ( not $values.ingressClass.enabled ) ( and ( $values.ingressClass.enabled ) ( $values.ingressClass.isDefaultClass ) ) }}traefikmiddlewares{{ else }}ix-{{ .Release.Name }}{{ end }} }}
|
2021-09-03 12:43:21 +00:00
|
|
|
{{ range $index, $middlewareData := .Values.middlewares.forwardAuth }}
|
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: Middleware
|
|
|
|
metadata:
|
|
|
|
name: {{ $middlewareData.name }}
|
2021-09-03 17:34:31 +00:00
|
|
|
namespace: {{ $namespace }}
|
2021-09-03 12:43:21 +00:00
|
|
|
spec:
|
|
|
|
forwardAuth:
|
|
|
|
address: {{ $middlewareData.address }}
|
|
|
|
{{- if $middlewareData.authResponseHeaders }}
|
|
|
|
authResponseHeaders: {{ $middlewareData.authResponseHeaders }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if $middlewareData.authRequestHeaders }}
|
|
|
|
authRequestHeaders: {{ $middlewareData.authRequestHeaders }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if $middlewareData.authResponseHeadersRegex }}
|
|
|
|
authResponseHeadersRegex: {{ $middlewareData.authResponseHeadersRegex }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if $middlewareData.trustForwardHeader }}
|
|
|
|
trustForwardHeader: true
|
|
|
|
{{- end }}
|
|
|
|
{{ end }}
|