-
Notifications
You must be signed in to change notification settings - Fork 0
/
oauth2-proxy-manifests
122 lines (122 loc) · 2.7 KB
/
oauth2-proxy-manifests
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
120
121
122
---
apiVersion: v1
kind: Namespace
metadata:
name: oauth2-proxy
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: oauth2-proxy
namespace: oauth2-proxy
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: contour:authserver:oauth2-proxy
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: contour:authserver:oauth2-proxy
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: contour:authserver:oauth2-proxy
subjects:
- kind: ServiceAccount
name: oauth2-proxy
namespace: oauth2-proxy
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: oauth2-proxy
name: oauth2-proxy
namespace: oauth2-proxy
spec:
ports:
- name: auth
port: 4180
protocol: TCP
targetPort: 4180
selector:
app.kubernetes.io/name: oauth2-proxy
type: ClusterIP
---
apiVersion: v1
kind: Secret
metadata:
name: oauth2-proxy
namespace: oauth2-proxy
stringData:
OAUTH2_PROXY_CLIENT_ID:<REDACTED>
OAUTH2_PROXY_CLIENT_SECRET:<REDACTED>
OAUTH2_PROXY_COOKIE_SECRET:<REDACTED>
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: oauth2-proxy
namespace: oauth2-proxy
spec:
selector:
matchLabels:
app.kubernetes.io/name: oauth2-proxy
template:
metadata:
labels:
app.kubernetes.io/name: oauth2-proxy
spec:
containers:
- name: oauth2-proxy
image: quay.io/oauth2-proxy/oauth2-proxy:v6.1.1
args:
- --provider=oidc
- --cookie-secure=true
- --cookie-samesite=lax
- --cookie-refresh=1h
- --cookie-expire=4h
- --cookie-name=_oauth2_proxy_contourauthservice
- --set-authorization-header=true
- --email-domain=*
- --http-address=0.0.0.0:4180
- --upstream=static://200
- --skip-provider-button=true
- --whitelist-domain=.example.com
- --oidc-issuer-url=<REDACTED>
env:
- name: OAUTH2_PROXY_CLIENT_ID
valueFrom:
secretKeyRef:
name: oauth2-proxy
key: OAUTH2_PROXY_CLIENT_ID
- name: OAUTH2_PROXY_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: oauth2-proxy
key: OAUTH2_PROXY_CLIENT_SECRET
- name: OAUTH2_PROXY_COOKIE_SECRET
valueFrom:
secretKeyRef:
name: oauth2-proxy
key: OAUTH2_PROXY_COOKIE_SECRET
resources:
requests:
cpu: 10m
memory: 100Mi
ports:
- containerPort: 4180
name: auth
protocol: TCP
serviceAccountName: oauth2-proxy