ops(prop): zero-downtime rolling update with single replica

maxUnavailable: 1 was killing the only pod before the new one was
ready, taking the site down for the entire image pull + boot window
on every deploy. Switch to maxSurge: 1 / maxUnavailable: 0 so K8s
spins up the replacement and waits for its readinessProbe to pass
before tearing down the old pod.
This commit is contained in:
Graham McIntire 2026-04-29 13:50:14 -05:00
parent 2de1b89efc
commit b66024e0c3
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -4,15 +4,20 @@ metadata:
name: prop
namespace: prop
spec:
# replicas is owned by the HPA in hpa.yaml (min 2 / max 5).
# Leaving it out here so Flux's periodic reconcile doesn't overwrite
# replicas is owned by the HPA in hpa.yaml (currently pinned at 1).
# Leaving it out here so the GitOps reconciler doesn't overwrite
# whatever replica count the autoscaler has settled on.
minReadySeconds: 5
strategy:
type: RollingUpdate
rollingUpdate:
# Zero-downtime rollout with a single replica: surge to 2 first,
# wait for the new pod to pass its readinessProbe, THEN tear down
# the old one. maxUnavailable: 1 (the K8s default) was killing the
# only pod before the replacement was ready, taking the site down
# for the entire image pull + boot window on every deploy.
maxSurge: 1
maxUnavailable: 1
maxUnavailable: 0
selector:
matchLabels:
app: prop