1. 添加 prestop 切换流量

This commit is contained in:
chenbowen
2026-01-07 19:49:11 +08:00
parent 6ecfcf2a09
commit 5aa83d739e

View File

@@ -27,6 +27,13 @@ spec:
env: env:
- name: TZ - name: TZ
value: Asia/Shanghai value: Asia/Shanghai
lifecycle:
preStop:
exec:
command:
- "/bin/sh"
- "-c"
- "sleep 35"
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /actuator/health path: /actuator/health
@@ -48,7 +55,7 @@ spec:
limits: limits:
cpu: "1" cpu: "1"
memory: "2048Mi" memory: "2048Mi"
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 40
strategy: strategy:
type: RollingUpdate type: RollingUpdate
rollingUpdate: rollingUpdate: