You need a per-environment image tag set by CI, while everything else lives in Git. How do you wire it?
BeginnerScenarioValues & Environments
Answer
Situation read → The tag changes on every build; the rest is reviewed config.
What I'd do →
- Imperative CI:
helm upgrade --install shop ./shop -f values-prod.yaml --set-string api.image.tag=$GIT_SHA. - GitOps: CI opens a PR or commits
api.image.tag: <sha>toenvs/prod/values.yaml; Argo CD syncs. - Use
--set-stringso tags like1.10or0123abckeep their exact text. - Record the SHA in
--descriptionfor traceability.
Why → Either way the deployed tag is traceable; GitOps also makes rollback a revert.
Interview tip → Mention --set-string and why.
More on Values & Environments
Dev, staging and prod values files have drifted and nobody knows which settings differ intentionally. What do you do?IntermediateA deploy pipeline uses `--reuse-values` and a new chart version just broke production. Why, and what do you change?AdvancedA 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