-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmanifest.yaml
119 lines (119 loc) · 2.36 KB
/
manifest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
apiVersion: apps/v1
kind: Deployment
metadata:
name: forwardauth-authcode-pkce
labels:
app: forwardauth-authcode-pkce
spec:
replicas: 1
selector:
matchLabels:
app: forwardauth-authcode-pkce
template:
metadata:
labels:
app: forwardauth-authcode-pkce
spec:
containers:
- image: asaintsever/traefik-forwardauth-authcode-pkce
imagePullPolicy: IfNotPresent
name: forwardauth-authcode-pkce
env:
- name: APP_URL
value: "http://<Traefik LoadBalancer IP>/whoami/"
- name: AUTH_CALLBACK_URL
value: "http://<Traefik LoadBalancer IP>/auth/callback"
- name: OIDC_PROVIDER_URL
value: "<Your OIDC Provider here>"
- name: TRAEFIK_APP_CLIENT_ID
value: "<Your client id here>"
ports:
- name: authcode-pkce
containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: forwardauth-authcode-pkce
spec:
selector:
app: forwardauth-authcode-pkce
ports:
- protocol: TCP
port: 80
targetPort: authcode-pkce
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: authcode-pkce-forwarder
spec:
forwardAuth:
address: http://forwardauth-authcode-pkce/auth
trustForwardHeader: true
---
apiVersion: v1
kind: Service
metadata:
name: whoami
spec:
selector:
app: whoami
ports:
- protocol: TCP
port: 80
targetPort: whoami-port
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: whoami
labels:
app: whoami
spec:
replicas: 1
selector:
matchLabels:
app: whoami
template:
metadata:
labels:
app: whoami
spec:
containers:
- image: containous/whoami
imagePullPolicy: IfNotPresent
name: whoami
ports:
- name: whoami-port
containerPort: 80
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: backend
spec:
entryPoints:
- web
routes:
- match: PathPrefix(`/whoami`)
kind: Rule
services:
- name: whoami
port: 80
middlewares:
- name: authcode-pkce-forwarder
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: auth
spec:
entryPoints:
- web
routes:
- match: PathPrefix(`/auth`)
kind: Rule
services:
- name: forwardauth-authcode-pkce
port: 80