feat: helm dependency build on render #8486
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #5445
Description
Fixes the issue described in #5445, where running
skaffold render
on a Helm Chart withdependencies
results in an error, because the Chart dependencies are not being updated:helm dep build
has been implemented onskaffold run|deploy
which is where this implementation was copied from.The
dep build
step can be skipped by settingskipBuildDependencies: true
on the correspondinghelm.release
, analogous to the implementation onskaffold deploy
.Unit tests have been adjusted to the best of my knowledge, happy about any further suggestions there.
User facing changes (remove if N/A)
Before: Running
skaffold render
on a Helm chart with dependencies results in an error on the underlyinghelm template
.After: Running
skaffold render
updates the Helm Charts' dependencies and renders them successfully.Alternatives considered
Initially I was thinking about using the
--dependency-update
flag onhelm template
, but this one was only implemented recently and I couldn't figure out how to easily evaluate the helm binary version inrenderer.helm
.The current implementation should be the safer path, since it properly honors the
Chart.lock
file (or creates it if missing).