A deploy must not happen if the rendered diff touches a StatefulSet's volumeClaimTemplates. How do you enforce it?
AdvancedScenarioReleases, Upgrades & Rollbacks
Answer
Situation read → volumeClaimTemplates are immutable; such a change fails the upgrade, or tempts someone to use --force.
What I'd do →
- In CI, render old and new (
helm get manifestvshelm template) and compare the StatefulSet'svolumeClaimTemplateswithyq; fail the job on change. - Or use helm-diff output filtered to the StatefulSet.
- Document the manual procedure for real storage changes (orphan-delete the StatefulSet, resize PVCs, recreate).
Why → Catching immutable-field changes before deploy avoids failed upgrades in prod.
Interview tip → Mention kubectl delete sts --cascade=orphan as the safe procedure.
More on Releases, Upgrades & Rollbacks
A production upgrade starts failing health checks five minutes after the deploy. What do you do?BeginnerWhy would you insist on `--atomic --wait` in CI, and what is the trade-off?IntermediateYou need zero-downtime upgrades of the API with Helm. What must be true in the chart?IntermediateA pipeline was cancelled mid-upgrade and now every deploy fails with "another operation is in progress". What do you do?AdvancedA rollback is requested, but the failed release ran a migration that dropped a column. What do you do?AdvancedThe team scaled a Deployment manually to 10 replicas during a traffic spike. The next deploy scaled it back to 3. Explain and fix.Intermediate