Interview Prep/Helm/Values & Environments

Dev, staging and prod values files have drifted and nobody knows which settings differ intentionally. What do you do?

IntermediateScenarioValues & Environments
Answer

Situation read → Each file copied the full values.yaml and edited it over time, so real differences are buried.

What I'd do →

  1. Render each environment and diff: diff <(helm template s ./shop -f values-staging.yaml) <(helm template s ./shop -f values-prod.yaml).
  2. Rewrite each env file to contain only overrides of chart defaults; move shared settings into values-common.yaml.
  3. Annotate intentional differences with comments ("prod: 3 replicas for HA").
  4. Add a CI job that prints the staging-vs-prod rendered diff on every PR.

Why → Small override files make differences reviewable and staging a real rehearsal for prod.

Interview tip → Say env files should contain overrides only, never a copy of defaults.

All Helm questions Roadmap: Helm

More on Values & Environments