-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yaml
95 lines (95 loc) · 2.09 KB
/
deploy.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
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: dex-login
name: dex-login
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
app: dex-login
template:
metadata:
labels:
app: dex-login
spec:
serviceAccountName: dex-login
containers:
- image: docker.io/cuisongliu/dex-login
imagePullPolicy: Always
name: dex-login
command:
- /dex-login
- --issuer
- https://172.27.139.108:32000
- --redirect-uri
- http://172.27.139.108:32001/callback
- --debug
- --listen
- http://0.0.0.0:5555
ports:
- name: https
containerPort: 5555
volumeMounts:
- name: localtime
mountPath: /etc/localtime
readinessProbe:
failureThreshold: 3 #成功后检测最小连续故障次数
initialDelaySeconds: 0 #初始延迟(秒)
periodSeconds: 10 #检测的间隔时间
successThreshold: 1 #失败后检测最小连续成功次数
timeoutSeconds: 0 #超时时间(秒)
tcpSocket:
port: 5555
volumes:
- name: localtime
hostPath:
path: /etc/localtime
---
apiVersion: v1
kind: Service
metadata:
name: dex-login
namespace: kube-system
spec:
type: NodePort
ports:
- name: dex-login
port: 5555
protocol: TCP
targetPort: dex-login
nodePort: 32001
selector:
app: dex-login
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: dex-login
name: dex-login
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: dex-login
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: dex-login
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: dex-login
subjects:
- kind: ServiceAccount
name: dex-login
namespace: kube-system