maintenance: serialize sweeper startup around offline pods
This commit is contained in:
parent
b4f0f6b48c
commit
8ba6ffc471
@ -11,7 +11,8 @@ spec:
|
|||||||
updateStrategy:
|
updateStrategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
maxUnavailable: 1
|
# Two unreachable old pods consume the budget; replace one reachable pod.
|
||||||
|
maxUnavailable: 3
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
@ -41,6 +42,12 @@ spec:
|
|||||||
- name: node-image-sweeper
|
- name: node-image-sweeper
|
||||||
image: python:3.12.9-alpine3.20
|
image: python:3.12.9-alpine3.20
|
||||||
command: ["/bin/sh", "/scripts/node_image_sweeper.sh"]
|
command: ["/bin/sh", "/scripts/node_image_sweeper.sh"]
|
||||||
|
startupProbe:
|
||||||
|
exec:
|
||||||
|
command: ["/bin/sh", "-c", "test -f /tmp/initial-sweep-complete"]
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 120
|
||||||
env:
|
env:
|
||||||
- name: SWEEP_INTERVAL_SEC
|
- name: SWEEP_INTERVAL_SEC
|
||||||
value: "7200"
|
value: "7200"
|
||||||
|
|||||||
@ -41,6 +41,7 @@ sweep_once() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sweep_once
|
sweep_once
|
||||||
|
touch /tmp/initial-sweep-complete
|
||||||
|
|
||||||
if [ "${ONE_SHOT}" = "true" ]; then
|
if [ "${ONE_SHOT}" = "true" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user