add app key

This commit is contained in:
2024-07-31 19:21:17 -05:00
parent 645c05d357
commit 6ecfd519b5
3 changed files with 65 additions and 20 deletions

View File

@@ -0,0 +1,33 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: koel
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: koel
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`koel.alexlebens.net`)
middlewares:
- name: authentik-koel
namespace: {{ .Release.Namespace }}
priority: 10
services:
- kind: Service
name: koel
port: 80
- kind: Rule
match: Host(`koel.alexlebens.net`) && PathPrefix(`/outpost.goauthentik.io/`)"
priority: 15
services:
- kind: Service
name: authentik-outpost-proxy
port: 9000
namespace: authentik

View File

@@ -0,0 +1,27 @@
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: authentik-koel
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: authentik-koel
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: auth
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
forwardAuth:
address: http://authentik-outpost-proxy.authentik:9000/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