pulumi-kubernetes icon indicating copy to clipboard operation
pulumi-kubernetes copied to clipboard

Helm lockfile support

Open EronWright opened this issue 2 years ago • 1 comments

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Helm v3 supports the use of a lockfile (Chart.lock or requirements.lock) to reconstruct a chart's dependencies to the state specified in the lock file. Used with helm dependency build to not re-negotiate dependencies, as helm dependency update does. https://helm.sh/docs/helm/helm_dependency_build/#helm-dependency-build

Pulumi should respect the lockfile when it exists. Note that Pulumi doesn't have a --dependency-update flag as Helm does with helm install; unlike Helm, Pulumi always updates the dependencies (without respecting the lockfile).

Suggested Change

I would suggest that Pulumi use helm dependency build rather than helm dependency update, which will respect the lockfile if one exists, and falls back to update otherwise. Note that Helm will return an error if the lockfile is out-of-date, e.g.:

Error: the lock file (requirements.lock) is out of sync with the dependencies file (requirements.yaml). Please update the dependencies

Affected area/feature

  • Helm Release
  • Helm Chart

EronWright avatar Nov 15 '23 22:11 EronWright

Note that Chart v4 has the suggested behavior; when chart dependency resolution fails, and there's a lock file, Chart v4 automatically runs helm dependency build. The remaining work would be to backport to Release v3 and/or to implement it in Release v4.

EronWright avatar Jun 07 '24 19:06 EronWright

Fixing this issue will close: https://github.com/pulumi/pulumi-kubernetes/issues/702

EronWright avatar Oct 31 '24 22:10 EronWright