Interview Prep/Helm/Values & Precedence

How do you keep image tags out of values files when CI builds images?

IntermediateConceptValues & Precedence
Answer

Two common patterns:

  1. CI passes the tag at deploy time: --set-string api.image.tag=$GIT_SHA. Simple, but the deployed tag is not in Git.
  2. GitOps: CI commits the new tag into values-prod.yaml (or Argo CD Image Updater does), so Git is the source of truth and rollback is a git revert.

Alternatively, package the chart with --app-version $VERSION and let templates default the tag to .Chart.AppVersion, so the chart version itself pins the image.

All Helm questions Roadmap: Helm

More on Values & Precedence