-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathingress-oauth2.yaml
46 lines (46 loc) · 1.12 KB
/
ingress-oauth2.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
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "true"
certmanager.k8s.io/cluster-issuer: letsencrypt-prod
name: oauth2-ingress
spec:
rules:
- host: DOMAIN
http:
paths:
- path: /oauth2
backend:
serviceName: oauth2-proxy-svc
servicePort: 4180
tls:
- hosts:
- DOMAIN
secretName: tls-secret
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: web-ing
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/rewrite-target: /
certmanager.k8s.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth"
nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$request_uri"
spec:
tls:
- hosts:
- DOMAIN
secretName: tls-secret
rules:
- host: DOMAIN
http:
paths:
- path: /
backend:
serviceName: web-svc
servicePort: 80