flaper87 / pyhelm

Python bindings for Helm
Apache License 2.0
109 stars 70 forks source link

how to implement helm command "helm dependency update" with pyhelm #28

Open fumanne opened 5 years ago

fumanne commented 5 years ago

some command like "helm dep update" how to implement this function?

fumanne commented 5 years ago

@flaper87
hello falper87 from helm docs, We see 'Note: The dependencies: section of the Chart.yaml from Helm Classic has been completely removed.' https://docs.helm.sh/developing_charts/ and your code is old.... https://github.com/flaper87/pyhelm/blob/master/pyhelm/chartbuilder.py#L201 so can you update it when you are free?

yanivoliver commented 5 years ago

pyhelm does not extract dependencies from Chart.yaml. You are (currently) required to build the chart object you pass to ChartBuilder to contain the dependency definitions in order for them to be used by the library.

yanivoliver commented 5 years ago

And regarding your first question, I'm not sure I understand. Are you asking how to replicate the functionality of the helm dependency update command? If so, this is not implemented as part of pyhelm, but as pyhelm doesn't use the on-disk mirrors of the dependencies it doesn't affect it.

fumanne commented 5 years ago

@yanivoliver yeah... I mean replicate the functionality of the helm dependency update command as part of pyhelm Because I use ansible helm module, and find this module can not work the functionality of the helm dependency update command

yanivoliver commented 5 years ago

Gotcha. pyhelm does not replicate most of the client-side logic of Helm, including not implementing the functionality of the dependency update command. Can you elaborate on your full use-case? What is your need of this functionality in pyhelm? If you install Charts using pyhelm you don't need this functionality, as we load the dependency straight from source instead of taking the .tgz version under Charts subdirectory.

fumanne commented 5 years ago

@yanivoliver OK... here is my case: A chart named kube-prometheus, it has requirements.yml and contains other chart. the architecture looks like this: kube-prometheus: | charts/ | Chart.yml | requirements.yml | values.yml | templates/ | prometheus/ |__ xx_exporters/ |__ yy_exporters/

In shell command: when to deploy this chart, need to use helm dep update command to generate some exporters.tgz in charts directory, then use helm install to deploy the whole chart. but when I use pyhelm. It does not work. if it is hard to implement this function, I need to separate this chart. thanks @yanivoliver

yanivoliver commented 5 years ago

Sorry for the (very very) late response. Is this still relevant?

kammous commented 4 years ago

@yanivoliver yes this issue is still relevant. It would be great to see this function implemented in PyHelm project. Otherwise, could you provide an implementation guide? By the way, is there any relation with issue #52 ?

Thanks a lot.