Interview Prep/Helm/Releases, Upgrades & Rollbacks

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 →

  1. In CI, render old and new (helm get manifest vs helm template) and compare the StatefulSet's volumeClaimTemplates with yq; fail the job on change.
  2. Or use helm-diff output filtered to the StatefulSet.
  3. 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.

All Helm questions Roadmap: Helm

More on Releases, Upgrades & Rollbacks