drain haproxy on shutdown and keep the stats listener on loopback
This commit is contained in:
@@ -21,6 +21,7 @@ spec:
|
||||
app: haproxy
|
||||
spec:
|
||||
automountServiceAccountToken: false
|
||||
terminationGracePeriodSeconds: 150
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
@@ -79,6 +80,15 @@ spec:
|
||||
- name: stats
|
||||
containerPort: 9090
|
||||
protocol: TCP
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
# SIGUSR1 to the master soft-stops the workers; hard-stop-after
|
||||
# caps the drain. Wait so kubelet holds SIGTERM until it is done.
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- kill -s USR1 1; while kill -0 1 2>/dev/null; do sleep 1; done
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
|
||||
Reference in New Issue
Block a user