peer
peer

Reputation: 4699

How to download a helm chart as a file for templating?

I can successfully push a helm chart to my harbor registry:

helm registry login -u robot$myrobo -p ... https://myregistry.mycompany.com
helm chart save mychart.gz myregistry.mycompany.com/myrepo/mychart:0.0.0-1 
helm chart push myregistry.mycompany.com/myrepo/mychart:0.0.0-1

I can pull the chart as well:

helm registry login -u robot$myrobo -p ... https://myregistry.mycompany.com
helm chart pull myregistry.mycompany.com/myrepo/mychart:0.0.0-1

Both commands succeed, but now I want to run

helm template name path/to/the/chart/I/just/downloaded -f another_file | further_processing

But path/to/the/chart/I/just/downloaded does not exist. It used to with helm 2 and another registry but now (with helm3) the file does not seem to be physically downloaded somewhere.

Except into the cache https://helm.sh/docs/topics/registries/#where-are-my-charts where I could probably parse the index.json and somehow get to my data but that is not desired. Is there a convenient way to access my files in the template command?

Proceedings:

Answer by Rafał Leszko:

I tried:

$ helm pull myregistry.mycompany.com/myrepo/mychart:0.0.0-1
Error: repo myregistry.mycompany.com not found
$ helm pull myrepo/mychart:0.0.0-1
Error: repo myrepo not found

I know there are no typos because helm chart pull myregistry.mycompany.com/myrepo/mychart:0.0.0-1 succeeds.

Upvotes: 0

Views: 9108

Answers (3)

Joseph Ng
Joseph Ng

Reputation: 143

you can try this command:

helm pull hazelcast/hazelcast --untar --destination ./chart   

Upvotes: 2

Alex Gem
Alex Gem

Reputation: 1

Try the commands below. You will need to add repository of Hazelcast before pulling the chart.

helm repo add hazelcast https://hazelcast-charts.s3.amazonaws.com/
helm repo update
helm pull hazelcast/hazelcast

Upvotes: 0

Rafał Leszko
Rafał Leszko

Reputation: 5531

With Helm 3, you can use the helm pull command. It downloads the given helm chart to the current directory.

Try the following commands. There work fine.

helm pull hazelcast/hazelcast
helm template hazelcast hazelcast-*.tgz

Upvotes: 1

Related Questions