-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathingress-oauth-proxy-ingress.yaml
48 lines (48 loc) · 1.26 KB
/
ingress-oauth-proxy-ingress.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
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "true"
cert-manager.io/issuer: letsencrypt-staging
name: oauth2-ingress
namespace: ingress-samples
spec:
tls:
- hosts:
- <SUBDOMAIN.YOUR_DOMAIN>
secretName: tls-secret
rules:
- host: <SUBDOMAIN.YOUR_DOMAIN>
http:
paths:
- path: /oauth2
backend:
serviceName: oauth2-proxy-svc
servicePort: 4180
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: headers-ing
namespace: ingress-samples
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/rewrite-target: /
cert-manager.io/issuer: letsencrypt-staging
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:
- <SUBDOMAIN.YOUR_DOMAIN>
secretName: tls-secret
rules:
- host: <SUBDOMAIN.YOUR_DOMAIN>
http:
paths:
- path: /
backend:
serviceName: headers-svc
servicePort: 80