Commit f4b903d9 authored by liaozan's avatar liaozan 🏀

feat: add preStop probe to graceful shutdown

parent df4e0826
...@@ -15,6 +15,7 @@ spec: ...@@ -15,6 +15,7 @@ spec:
labels: labels:
app: ${APP_NAME} app: ${APP_NAME}
spec: spec:
terminationGracePeriodSeconds: 20
containers: containers:
- name: ${APP_NAME} - name: ${APP_NAME}
image: ${IMAGE} image: ${IMAGE}
...@@ -24,6 +25,12 @@ spec: ...@@ -24,6 +25,12 @@ spec:
protocol: TCP protocol: TCP
- containerPort: 1024 - containerPort: 1024
protocol: TCP protocol: TCP
lifecycle:
preStop:
httpGet:
scheme: HTTP
path: /actuator/offline
port: 1024
livenessProbe: livenessProbe:
httpGet: httpGet:
scheme: HTTP scheme: HTTP
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment