Interview Prep/Helm/Values & Environments

A values key rename is needed (`image.name` to `image.repository`). How do you avoid breaking users?

AdvancedScenarioValues & Environments
Answer

Situation read → Consumers have overrides with the old key; a silent rename would deploy the default image.

What I'd do →

  1. Support both for one minor version: {{ .Values.image.repository | default .Values.image.name }}.
  2. Emit a deprecation warning in NOTES.txt when the old key is set.
  3. Remove it in the next major version, and in that version fail if the old key is still present, with instructions.
  4. Document it in the chart changelog (artifacthub.io/changes annotation).

Why → A deprecation window plus a hard failure is far safer than a silent behavior change.

Interview tip → "Fail loudly on removed keys" is the key phrase.

All Helm questions Roadmap: Helm

More on Values & Environments