Use helm dependency build in release build #563
Reference in New Issue
Block a user
No description provided.
Delete Branch "justusbunsi/helm-chart:build-vs-update"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Using
helm dependency updatemay result in unwillingly updating thedependencies while cutting a release. I wasn't able to do so. Most
likely due to the dependency pinning in Chart.yaml and Chart.lock.
Based on Helm documentation,
updateuses Chart.yaml1 whilebuilduses Chart.lock2 .
All in all it is safer to use
helm dependency build. :Dhttps://helm.sh/docs/helm/helm_dependency_update/ ↩︎
https://helm.sh/docs/helm/helm_dependency_build/ ↩︎
helm dependency buildin release buildInteresting. Shouldn't
Chart.lockandChart.yamlbe in sync at all times? The former is created from the latter and I don't see howhelm dependency updatewould changeChart.yamlif a fixed version is used.However, if you make a manual change to
Chart.yaml(e.g. to prepare an update) and runhelm dependency build, you will get an error:which essentially means: "Use
helm dependency update".So I wonder: should we just stick to
helm dependency update? What event motivated you too look into this in the first place?@pat-s I probably confused you with the PR description. What I wanted to say:
Regenerating the
chartsfolder is possible with both commandshelm dependency buildandhelm dependency update.buildcommand: This is its sole purpose.upgradecommand: Thechartsfolder will be build, but you are usually using this command for updating dependencies.That's similar to
npm installandnpm update.The intention of this PR is consistency within our builds. For releasing the chart, we simply need to regenerate the
chartsfolder. There is no intention to update dependencies. So it would be consistent to usehelm dependency build, notupdate.IMO, the continued usage of
helm dependency updatein our release workflow is risky. Maybe not right now as we have versions in bot Chart.yaml and Chart.lock preventing an unintended update.I got there because I looked up what the release build does - in the context of #564. And then downloaded the released tar.gz file to make sure there was no implicit dependency update.
Using
helm dependency buildeliminates any doubts in the future. 🙂Thanks for the detailed clarification. All clear now!
@techknowlogick You wanna review or shall we merge?
Merging now.