Update addons/traefik.yaml
This commit is contained in:
parent
5b4850a045
commit
83f4db0116
@ -1,37 +1,44 @@
|
|||||||
# apiVersion: traefik.io/v1alpha1
|
apiVersion: traefik.io/v1alpha1
|
||||||
# kind: IngressRoute
|
kind: IngressRoute
|
||||||
# metadata:
|
metadata:
|
||||||
# name: chart_name
|
name: {{ .Chart.Name }}
|
||||||
# namespace: chart_namespace
|
namespace: {{ .Values.namespace }}
|
||||||
# spec:
|
spec:
|
||||||
# routes:
|
routes:
|
||||||
# - kind: Rule
|
- kind: Rule
|
||||||
# match: Host(`chart_host`)
|
match: {{ .Values.expose.match }}
|
||||||
# middlewares:
|
{{- if .Values.expose.middlewares }}
|
||||||
# - name: authentik
|
middlewares:
|
||||||
# services:
|
{{ toYaml .Values.expose.middlewares }}
|
||||||
# - name: chart_service
|
{{- end }}
|
||||||
# namespace: chart_namespace
|
services:
|
||||||
# port: chart_port
|
- name: {{ .Values.expose.service.name }}
|
||||||
# ---
|
port: {{ .Values.expose.service.port }}
|
||||||
# apiVersion: traefik.io/v1alpha1
|
namespace: {{ .Values.namespace }}
|
||||||
# kind: Middleware
|
{{ if has "authentik" .Values.expose.middlewares }}
|
||||||
# metadata:
|
---
|
||||||
# name: authentik
|
apiVersion: traefik.io/v1alpha1
|
||||||
# namespace: chart_namespace
|
kind: Middleware
|
||||||
# spec:
|
metadata:
|
||||||
# forwardAuth:
|
name: authentik
|
||||||
# address: https://chart_host/outpost.goauthentik.io/auth/traefik
|
namespace: {{ .Values.namespace }}
|
||||||
# authResponseHeaders:
|
spec:
|
||||||
# - X-authentik-username
|
forwardAuth:
|
||||||
# - X-authentik-groups
|
{{- $regexArray := mustRegexFindAll "Host[(]`[^`]+`[)]" .Values.expose.match -1 }}
|
||||||
# - X-authentik-email
|
{{- $firstHost := index $regexArray 0 }}
|
||||||
# - X-authentik-name
|
{{- $hostname := regexReplaceAll ".+`([^`]+)`.+" $firstHost "$1"}}
|
||||||
# - X-authentik-uid
|
address: https://{{ $hostname }}/outpost.goauthentik.io/auth/traefik
|
||||||
# - X-authentik-jwt
|
authResponseHeaders:
|
||||||
# - X-authentik-meta-jwks
|
- X-authentik-username
|
||||||
# - X-authentik-meta-outpost
|
- X-authentik-groups
|
||||||
# - X-authentik-meta-provider
|
- X-authentik-email
|
||||||
# - X-authentik-meta-app
|
- X-authentik-name
|
||||||
# - X-authentik-meta-version
|
- X-authentik-uid
|
||||||
# trustForwardHeader: true
|
- X-authentik-jwt
|
||||||
|
- X-authentik-meta-jwks
|
||||||
|
- X-authentik-meta-outpost
|
||||||
|
- X-authentik-meta-provider
|
||||||
|
- X-authentik-meta-app
|
||||||
|
- X-authentik-meta-version
|
||||||
|
trustForwardHeader: true
|
||||||
|
{{ end }}
|
||||||
Loading…
x
Reference in New Issue
Block a user