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 →
- Render each environment and diff:
diff <(helm template s ./shop -f values-staging.yaml) <(helm template s ./shop -f values-prod.yaml). - Rewrite each env file to contain only overrides of chart defaults; move shared settings into
values-common.yaml. - Annotate intentional differences with comments ("prod: 3 replicas for HA").
- 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.
More on Values & Environments
A deploy pipeline uses `--reuse-values` and a new chart version just broke production. Why, and what do you change?AdvancedYou need a per-environment image tag set by CI, while everything else lives in Git. How do you wire it?BeginnerA value that should be `false` in prod keeps rendering as enabled. Where do you look?IntermediateDifferent clusters need different storage classes and ingress classes. How do you keep the chart portable?IntermediateA developer passes 20 `--set` flags in a shell script. What would you change?BeginnerYou must deploy to a region with an air-gapped cluster. How do you handle values and images?Advanced