feat(helm): add --helm-dependency-update to run helm dependency update#6123
feat(helm): add --helm-dependency-update to run helm dependency update#6123isumitsolanki wants to merge 1 commit intokubernetes-sigs:masterfrom
Conversation
…e before template Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>
|
Welcome @isumitsolanki! |
|
Hi @isumitsolanki. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: isumitsolanki The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Description
Adds opt-in
--helm-dependency-updateso Kustomize runshelm dependency updateon each chart beforehelm template, and exposes the same behavior viaHelmConfig.DependencyUpdatefor API users.Fixes #6119
Problem
kustomize build --enable-helmrenders charts withhelm templatebut does not refresh chart dependencies. Local charts (or setups like Argo CD that only runkustomize build --enable-helm) fail whenChart.yamllistsdependenciesbut thecharts/directory was never populated byhelm dependency update.Root cause
The Helm inflator assumes the chart directory is already dependency-complete.
helm dependency updateis a separate, potentially expensive step (disk + network). Kustomize intentionally did not run it by default.Solution
--helm-dependency-update(requires--enable-helmor--enable-alpha-plugins).helm dependency update <chartDir>after the chart exists locally (including afterhelm pull).types.HelmConfig.DependencyUpdate.file://dependency — fails without flag, succeeds withDependencyUpdate.How to test
go test ./kustomize/commands/build/... ./api/krusty/... -run TestHelmDependencyUpdate -count=1