Interview Prep/Helm/Hooks, Migrations & Testing

Two hooks with the same weight run in an unexpected order. How does Helm decide?

IntermediateScenarioHooks, Migrations & Testing
Answer

Situation read → Same weight means Helm falls back to kind order, then name order.

What I'd do →

  1. Give explicit, distinct weights to anything with a dependency (-10, -5, 0, 5).
  2. Document weights in comments.
  3. Keep the number of hooks small; combine steps into one Job if they are always sequential.

Why → Relying on implicit tie-breaking is fragile.

Interview tip → Know the sort: weight, then kind, then name.

All Helm questions Roadmap: Helm

More on Hooks, Migrations & Testing