dep-示例-shuteng-web

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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.module: acp
app.type: APAC
disney.com.canary: "false"
name: shuteng-b
namespace: test
spec:
progressDeadlineSeconds: 600
replicas: 6
revisionHistoryLimit: 10
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: topology.kubernetes.io/zone
operator: In
values:
- cn-shanghai-b
- cn-shanghai-l
podAntiAffinity: {}
containers:
- env:
- name: SERVICE_NAME
value: shuteng
- name: DEPLOYED_ENV
value: prod-b
envFrom:
- configMapRef:
name: shuteng-b
image: shdr-applications-registry-vpc.cn-shanghai.cr.aliyuncs.com/application/shuteng:1.0.0-762-rel
imagePullPolicy: IfNotPresent
lifecycle:
postStart:
httpGet:
path: /healthz/ready
port: 15020
scheme: HTTP
preStop:
exec:
command:
- sh
- -c
- kill $(ps -ef --no-headers|grep '/sharedFiles/AppServerAgent/javaagent.jar'|awk
'{print $2}')
livenessProbe:
exec:
command:
- sh
- /tmp1/health-check.sh
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 5
name: shuteng-b
ports:
- containerPort: 8080
protocol: TCP
readinessProbe:
exec:
command:
- sh
- /tmp1/health-check.sh
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 5
resources:
limits:
cpu: "4"
memory: 8Gi
requests:
cpu: "2"
memory: 4Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/localtime
name: tz-config
- mountPath: /tmp1
name: shuteng-health-check
- mountPath: /sharedFiles
name: shared-files
dnsPolicy: ClusterFirst
initContainers:
- command:
- sh
- -c
- cp -r /sharedFiles/AppServerAgent /mountPath/AppServerAgent; chmod -R 777
/mountPath
image: shdr-applications-registry-vpc.cn-shanghai.cr.aliyuncs.com/shdr-cse/java-app-agent:22.7.0
imagePullPolicy: IfNotPresent
name: java-agent
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /mountPath
name: shared-files
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: shuteng
serviceAccountName: shuteng
terminationGracePeriodSeconds: 30
volumes:
- hostPath:
path: /usr/share/zoneinfo/Asia/Shanghai
type: ""
name: tz-config
- configMap:
defaultMode: 420
items:
- key: health-check.sh
path: health-check.sh
name: shuteng-b-health-check
name: shuteng-health-check
- emptyDir: {}
name: shared-files