Skip to content

Commit a7e6961

Browse files
author
grissom.wang
committed
simplify user deployment
1 parent 265067e commit a7e6961

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

3.0_Microservice/ex3.2/user-service/user-deployment.yaml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ spec:
1515
app: user-service
1616
spec:
1717
hostname: user-service
18-
terminationGracePeriodSeconds: 25
1918
containers:
2019
- name: user-service
2120
image: user-service:2025
@@ -25,36 +24,6 @@ spec:
2524
value: http://eureka:8080/eureka
2625
ports:
2726
- containerPort: 9090
28-
startupProbe:
29-
httpGet:
30-
path: /actuator/health
31-
port: 8081
32-
initialDelaySeconds: 15 # 应用启动后等待 10 秒开始检查
33-
periodSeconds: 5 # 每 5 秒检查一次
34-
failureThreshold: 30 # 允许的最大失败次数(30 * 5 = 150 秒)
35-
readinessProbe:
36-
httpGet:
37-
path: /actuator/health
38-
port: 8081
39-
initialDelaySeconds: 0
40-
periodSeconds: 3
41-
failureThreshold: 2
42-
livenessProbe:
43-
httpGet:
44-
path: /actuator/health
45-
port: 8081
46-
initialDelaySeconds: 0
47-
periodSeconds: 3
48-
failureThreshold: 2
49-
lifecycle:
50-
preStop:
51-
exec:
52-
command:
53-
[
54-
"sh",
55-
"-c",
56-
"curl -X POST http://localhost:8081/actuator/shutdown && sleep 5",
57-
]
5827
resources:
5928
requests:
6029
cpu: 100m

0 commit comments

Comments
 (0)