fix(companies): use Recreate deploy strategy to avoid RWO PVC Multi-Attach
All checks were successful
sync-to-github / sync (push) Successful in 15s

companies is the only service mounting nxtgauge-uploads-pvc (ReadWriteOnce).
Default RollingUpdate surges a second pod before the old one releases the
volume, causing FailedAttachVolume/Multi-Attach and a permanently stuck
rollout (12+ dead ReplicaSets had piled up from this over the past few
days). Recreate tears down the old pod first so the new one can attach.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
sync-test 2026-08-17 19:41:08 +05:30
parent 689be1a9d1
commit 837e0f71ac

View file

@ -3,6 +3,15 @@ kind: Deployment
metadata:
name: nxtgauge-rust-companies
spec:
# companies is the only service mounting nxtgauge-uploads-pvc (RWO), and
# the default RollingUpdate strategy surges a second pod before the old
# one releases the volume -> FailedAttachVolume "Multi-Attach error",
# leaving the rollout stuck and the dead ReplicaSet piling up until
# someone notices. Recreate tears down the old pod (releasing the PVC)
# before scheduling the new one, so single-replica + RWO volume rollouts
# actually complete.
strategy:
type: Recreate
template:
spec:
volumes: