Skip to content

Commit 6fd06a7

Browse files
committed
fix st2web lifcycle
1 parent 93b641c commit 6fd06a7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

templates/deployments.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,6 @@ spec:
433433
{{- end }}
434434
ports:
435435
- containerPort: {{ eq (get .Values.st2web.env "ST2WEB_HTTPS" | toString) "1" | ternary 443 80 }}
436-
lifecycle:
437-
preStop:
438-
exec: # https://blog.laputa.io/graceful-shutdown-in-kubernetes-85f1c8d586da
439-
# kubeproxy and kubelet both race
440-
# wait a bit to ensure kubeproxy has removed the iptables rule.
441-
command: [ "sleep", {{ .Values.st2web.preStopSleep | toString }} ]
442436
# Probe to check if app is running. Failure will lead to a pod restart.
443437
livenessProbe:
444438
httpGet:
@@ -482,6 +476,11 @@ spec:
482476
mountPath: /post-start.sh
483477
subPath: post-start.sh
484478
lifecycle:
479+
preStop:
480+
exec: # https://blog.laputa.io/graceful-shutdown-in-kubernetes-85f1c8d586da
481+
# kubeproxy and kubelet both race
482+
# wait a bit to ensure kubeproxy has removed the iptables rule.
483+
command: [ "sleep", {{ .Values.st2web.preStopSleep | toString }} ]
485484
postStart:
486485
exec:
487486
command: ["/bin/bash", "/post-start.sh"]

0 commit comments

Comments
 (0)