-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdeployment.yaml
More file actions
99 lines (99 loc) · 2.53 KB
/
Copy pathdeployment.yaml
File metadata and controls
99 lines (99 loc) · 2.53 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: password-self-service
name: password-self-service
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: password-self-service
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app.kubernetes.io/name: password-self-service
spec:
containers:
- name: password-self-service
image: registry.cn-hangzhou.aliyuncs.com/kubeop/password-self-service:v1.0.0
imagePullPolicy: Always
args:
- --config=/etc/password-self-service/password-self-service.yaml
ports:
- containerPort: 8080
name: http
protocol: TCP
env:
- name: APP_ENV
value: prd
- name: APP_LANG
value: go
- name: APP_PROJECT
value: ops
- name: APP_NAME
value: password-self-service
- name: NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
livenessProbe:
failureThreshold: 3
httpGet:
path: /health
port: 8080
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /health
port: 8080
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
resources:
limits:
cpu: "1"
memory: 2Gi
requests:
cpu: "1"
memory: 2Gi
securityContext:
runAsNonRoot: true
runAsUser: 65534
startupProbe:
failureThreshold: 3
httpGet:
path: /health
port: 8080
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
volumeMounts:
- mountPath: /etc/password-self-service
name: password-self-service
readOnly: false
terminationGracePeriodSeconds: 60
volumes:
- name: password-self-service
configMap:
name: password-self-service