59 lines
2.0 KiB
YAML
59 lines
2.0 KiB
YAML
---
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: authentik.core.home.{{ .Values.global.domain }}
|
|
namespace: chart-authentik
|
|
spec:
|
|
routes:
|
|
- kind: Rule
|
|
match: "Host(`authentik.core.home.{{ .Values.global.domain }}`)"
|
|
middlewares:
|
|
- name: forwardauth-authentik
|
|
namespace: chart-authentik
|
|
priority: 10
|
|
services:
|
|
- kind: Service
|
|
name: authentik-server
|
|
namespace: chart-authentik
|
|
port: 80
|
|
- kind: Rule
|
|
match: "Host(`authentik.core.home.{{ .Values.global.domain }}`) && PathPrefix(`/outpost.goauthentik.io/`)"
|
|
priority: 15
|
|
services:
|
|
- kind: Service
|
|
name: authentik-server
|
|
namespace: chart-authentik
|
|
port: 80
|
|
{{ if .Values.global.tls.enabled }}
|
|
tls:
|
|
secretName: tls-authentik.core.home.{{ .Values.global.domain }}
|
|
domains:
|
|
- main: authentik.core.home.{{ .Values.global.domain }}
|
|
{{ end }}
|
|
---
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
kind: Middleware
|
|
metadata:
|
|
name: forwardauth-authentik
|
|
namespace: chart-authentik
|
|
spec:
|
|
forwardAuth:
|
|
address: http://authentik.core.home.{{ .Values.global.domain }}/outpost.goauthentik.io/auth/traefik
|
|
trustForwardHeader: true
|
|
authResponseHeaders:
|
|
- X-authentik-username
|
|
- X-authentik-groups
|
|
- X-authentik-email
|
|
- X-authentik-name
|
|
- X-authentik-uid
|
|
- X-authentik-jwt
|
|
- X-authentik-meta-jwks
|
|
- X-authentik-meta-outpost
|
|
- X-authentik-meta-provider
|
|
- X-authentik-meta-app
|
|
- X-authentik-meta-version
|
|
---
|
|
{{ if .Values.global.tls.enabled }}
|
|
{{ include "homelab.ingress.domain.tls" (dict "global" .Values.global "namespace" "chart-authentik" "prefix" "authentik.core.home" "domain" .Values.global.domain ) }}
|
|
{{ end }} |