You want smoke tests to block promotion from staging to prod. How do you wire `helm test` into the pipeline?
BeginnerScenarioHooks, Migrations & Testing
Answer
Situation read → Promotion should be automatic only if staging is healthy.
What I'd do →
- Staging job:
helm upgrade --install ... --atomic --wait, thenhelm test shop -n shop --logs --timeout 3m. - Fail the job on non-zero exit; prod job depends on it.
- Promote the exact same chart version and image digest to prod.
Why → You promote an artifact that was tested, not a rebuild.
Interview tip → "Promote the same artifact" is the key phrase.
More on Hooks, Migrations & Testing
Design database migrations for a Helm-deployed app where the database is a subchart.IntermediateThe migration Job takes 12 minutes on prod data and the upgrade times out. What do you change?IntermediateA migration hook failed and the Job pod was deleted, so you cannot see why. How do you fix the chart?BeginnerYou want a backup before every production upgrade. How do you do it with Helm?IntermediateA `post-install` hook seeds demo data; it ran again on every upgrade and duplicated rows. Why?IntermediateHow do you clean up external resources (DNS records, S3 buckets) when a release is uninstalled?Advanced