-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdex-example-app.yaml
More file actions
75 lines (71 loc) · 1.68 KB
/
dex-example-app.yaml
File metadata and controls
75 lines (71 loc) · 1.68 KB
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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: dex
role: example-app
name: dex-example
namespace: dex
spec:
replicas: 1
template:
metadata:
labels:
app: dex
role: example-app
spec:
containers:
- image: quay.io/coreos/dex-login:3
name: dex-worker
command:
- "/opt/dex/bin/example-app"
- --redirect-url=https://kubernetes-auth.[your domain here].com/callback
- --client-id=[client id from dex config]
- --client-secret=[client secret from dex config (could be put in a kubernetes secret and referenced here)]
- --discovery=https://dex.[your domain here].com
- --listen=http://127.0.0.1:5555
ports:
- containerPort: 5555
name: example-port
volumeMounts:
- name: ca
mountPath: /etc/ca-certificates
readOnly: true
- name: ssl
mountPath: /etc/ssl
readOnly: true
volumes:
- name: ca
hostPath:
path: /usr/share/ca-certificates
- name: ssl
hostPath:
path: /etc/ssl
---
apiVersion: v1
kind: Service
metadata:
name: dex-example
namespace: dex
spec:
ports:
- name: example-port
port: 5555
selector:
app: dex
role: example-app
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: dex-example
namespace: dex
spec:
rules:
- host: kubernetes-auth.[your url here].com
http:
paths:
- path: /
backend:
serviceName: dex-example
servicePort: 5555