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

Recursive dependency handling for charts. #2247

Open
libesz opened this issue Apr 10, 2017 · 66 comments
Open

Recursive dependency handling for charts. #2247

libesz opened this issue Apr 10, 2017 · 66 comments

Comments

@libesz
Copy link
Contributor

libesz commented Apr 10, 2017

Use case:

Complex applications may have nested dependencies between the different charts. As the dependencies are visible by recursively scanning the charts, it can be naturally desired to assemble top-level charts with single helm operation.

Problem:

Currently helm dependency build handles only first-level dependencies. These first level dependencies are put into the charts/ folder in tgz format and treated as complete (assuming second level dependencies built in the first level deps tgz).

Workaround:

Currently user has to create tool which either knows the dependencies in-built or able to scan requirements.yaml while calling or faking helm dependency build steps.

Solution:

Would be good to have a --recursive flag to the dependency build command in helm. This would scan the dependencies recursively and fixing any missing charts immediately. This would also store the dependencies under /charts in an untarred manner in order to avoid inception 😄.
The ultimate solution would be to have this implicit chart procurement option in case of helm install.

Problem statement in slack archive.

@thomastaylor312
Copy link
Contributor

Marking this as a proposal for discussion. Once it has been discussed and scoped out, we can tag it as a feature.

@thomastaylor312 thomastaylor312 changed the title Recursive dependency handling for charts. Proposal: Recursive dependency handling for charts. Apr 11, 2017
@libesz
Copy link
Contributor Author

libesz commented Apr 11, 2017

Thanks @thomastaylor312 . Waiting for others concerns on the design.

@technosophos
Copy link
Member

I'm in favor of adding a dependency build --recursive flag.

@libesz
Copy link
Contributor Author

libesz commented Apr 13, 2017

Do we allow the --recursive option to untar the dependencies? It would be essential I think.
Or should we also introduce also some --untar option as well for this command, which is forced to true when doing dependency build recursively?

@thomastaylor312
Copy link
Contributor

I don't think there is a need to build in a specific --untar flag for this. If you concur @libesz, let me know and I will tag this as a feature request. Is this something you would want to submit a PR for?

@libesz
Copy link
Contributor Author

libesz commented Apr 14, 2017

Yes, I am going to submit PR for this.
So you think --recursive shall by-default untar things?

@thomastaylor312
Copy link
Contributor

Yeah, I think that is the best idea

@thomastaylor312 thomastaylor312 changed the title Proposal: Recursive dependency handling for charts. Recursive dependency handling for charts. Apr 15, 2017
@apeschel
Copy link

apeschel commented Aug 3, 2017

What is the plan for if two subscharts have different dependency versions? EG

topchart
├── subchart1
│   ├── postgresql-0.5.0
│   └── redis-0.3.6
└── subchart2
    ├── postgresql-0.6.0
    └── redis-0.4.6

@apeschel
Copy link

apeschel commented Aug 3, 2017

I've filed a relevant issue: #2759

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@devlounge
Copy link

Hi, any update on this?
I also try to implement a base chart requiring charts which require other charts and cannot find a solution

@libesz
Copy link
Contributor Author

libesz commented Jan 12, 2018

@devlounge See the status in the PR here. We are stuck at the point where some tests are needed. Would you mind to test the PR branch with your charts?

@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@libesz
Copy link
Contributor Author

libesz commented Feb 23, 2018

/remove-lifecycle rotten

@thomastaylor312
Copy link
Contributor

/lifecycle frozen

@stefan-caraiman
Copy link

Any status regarding the writing of the HIP for this issue? Would be great to have this enabled by default since atm nested chart dependencies will fail silently/not produce anything.

@github-actions
Copy link

github-actions bot commented Sep 2, 2022

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Sep 2, 2022
@MurzNN
Copy link

MurzNN commented Sep 2, 2022

bump

@github-actions github-actions bot removed the Stale label Sep 3, 2022
@imunhatep
Copy link

/remove-lifecycle stale

@wvengen
Copy link

wvengen commented Oct 27, 2022

Another script to do a recursive helm dep build when a chart is missing. This one does a refresh of the repositories once and only when there is a missing dependency.

#!/bin/sh
#
# helm-dep-build-recursive
#
# Recursive version of `helm dep build`.
#
# Will hopefully become obsolete after: https://github.com/helm/helm/issues/2247

refreshdone=0
subcharts=$(ls `find . -name charts | sed 's/$/\/*\/Chart.yaml/'` 2>/dev/null | sed 's/\/Chart\.yaml$//')
for chart in . $subcharts; do
  if helm dep list $chart | grep -v '\(^\|WARNING: no dependencies.*\|STATUS\|ok\|unpacked\)\s*$' >/dev/null; then
    if [ "$refreshdone" = 0 ]; then
      helm dep build $chart
      refreshdone=1
    else
      helm dep build --skip-refresh $chart
    fi
  fi
done

@migueleliasweb
Copy link

migueleliasweb commented Jan 2, 2023

Getting close to 6 years. Any updates on this?

@migueleliasweb
Copy link

Okay, I'm giving a shot at this. 💪

@migueleliasweb
Copy link

Hi all, I have a working PR: #11766

The commands I'm purposing look like:

helm install --dependency-update-recursive my-chart
helm template --dependency-update-recursive my-chart
helm dependency build --recursive
helm dependency update --recursive

If someone could test with my branch; you only need to run a make build and use the binary from ./bin/helm.

If you all could 👍 the PR, it would help a lot to get some traction on this. Thanks!

@joejulian joejulian added in progress and removed help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Feb 2, 2023
@Migara-Pramod
Copy link

Any update on this issue. I prefer to have native support from helm for this feature rather than apply workaround

@migueleliasweb
Copy link

@Migara-Pramod I'm still waiting for an official review of this PR =/

@grahamprimm
Copy link

I'm also hoping for this feature to be added

@abdennour
Copy link

Almost 7 years waiting the feature! any news ?

@AnguIar
Copy link

AnguIar commented Jan 2, 2024

Almost 7 years waiting the feature! any news ?

+1, we have nested helm charts and resolving them each time is a major headache for us

@gilesknap
Copy link

Came here looking for a solution to recursive dependencies too. Seems like a reasonable thing to do with helm charts and not a very hard thing to support fully.

@dataops1948-2
Copy link

+1, I am also looking for this solution.
There is an update?

@webertrlz
Copy link

+1

1 similar comment
@R-Studio
Copy link

+1

@rishi97
Copy link

rishi97 commented Mar 3, 2024

Is this feature ever going to come? 🤔
We have a nested helm chart with sub-dependencies of dependencies.

@miezys
Copy link

miezys commented Mar 18, 2024

+1

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.