scale-catalog/premium/traefik/27.0.14/templates/middlewares/forwardauth.yaml

30 lines
999 B
YAML
Raw Normal View History

2024-07-13 07:59:30 +00:00
{{- range $index, $middlewareData := .Values.middlewares.forwardAuth }}
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
namespace: {{ $.Release.Namespace }}
spec:
forwardAuth:
address: {{ $middlewareData.address }}
{{- with $middlewareData.authResponseHeaders }}
authResponseHeaders:
{{- toYaml . | nindent 4 }}
{{- end -}}
{{- with $middlewareData.authRequestHeaders }}
authRequestHeaders:
{{- toYaml . | nindent 4 }}
{{- end -}}
{{- if $middlewareData.authResponseHeadersRegex }}
authResponseHeadersRegex: {{ $middlewareData.authResponseHeadersRegex }}
{{- end -}}
{{- if $middlewareData.trustForwardHeader }}
trustForwardHeader: true
{{- end -}}
{{- with $middlewareData.tls }}
tls:
insecureSkipVerify: {{ .insecureSkipVerify | default false }}
{{- end -}}
{{- end -}}