Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE]: Add flag to disable chart dependency updates for Helm Deploy actions #5979

Closed
m-ackley opened this issue Apr 26, 2024 · 1 comment · Fixed by #6012
Closed

[FEATURE]: Add flag to disable chart dependency updates for Helm Deploy actions #5979

m-ackley opened this issue Apr 26, 2024 · 1 comment · Fixed by #6012

Comments

@m-ackley
Copy link

m-ackley commented Apr 26, 2024

Feature Request

Background / Motivation

Our organization uses a Helm chart to deploy and configure our services in production environments, and currently, we are in the process of converting Garden to use that chart for development environments as well. What we're aiming to do is to set up Garden modules to deploy individual services, but have run into a problem with using the same chart across multiple modules.

Each Helm Deploy action will always run a helm dependency update when deploying, which causes a conflict when parallel modules compete over the tmpcharts directory. That directory is used by Helm to download the dependent charts before copying them over to the proper charts directory. This conflict over the tmpcharts directory can cause deploys to fail if one module cleans up the directory while another is running.

Error: open /Users/username/org/repo/charts/mychart/tmpcharts: no such file or directory

Some workarounds are:

  • Add a dependency chain in Garden to deploy each module one at a time
  • Separate each service into an individual chart

But neither of those options will scale with a larger number of services.

Since the dependencies can be updated manually or already be present in the chart, it is not necessary to always run the helm dependency update and therefore should be an option in the Garden Helm Deploy action. This could also default to true to not change the behavior for existing modules.

What should the user be able to do?

Specify a boolean value in the Helm Deploy action to disable dependency update.

Why do they want to do this? What problem does it solve?

Allow parallel Helm Deploy actions to deploy using the same chart without conflicts.

Suggested Implementation(s)

Add a value for disabling update of dependencies:

kind: Deploy
type: helm
name: my-helm-module
spec:
  updateDependencies: false

When false, the dependency update that occurs here would be skipped, and also the --dependency-update argument would be omitted from the render template function here.

How important is this feature for you/your team?

🌵 Not having this feature makes using Garden painful

@thsig
Copy link
Collaborator

thsig commented May 7, 2024

Hi @m-ackley! Thanks for writing this up.

I think a better approach would be to fix the race condition around the Helm dependency update (rather than adding a flag to skip dependency updates).

We'll take a look at this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants