Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fail to upload chart to chartmuseum

As https://github.com/kubernetes-helm/chartmuseum, I set up chartmuseum by running helm install incubator/chartmuseum in Kubernetes cluster.

When I want to upload chart by running

curl --data-binary "@mychart-0.1.0.tgz" http://$URL:$PORT/api/charts

it returns 404 page not found even if i run it in the container which chartmuseum running on.

like image 925
Yashon Lin Avatar asked Feb 02 '18 06:02

Yashon Lin


1 Answers

By default helm chart incubator/chartmuseum installs with DISABLE_API: true parameter, so, that's why any request to /api don't work (returns 404).

You need to install helm chart incubator/chartmuseum with DISABLE_API: false parameter:

helm install incubator/chartmuseum --set env.open.DISABLE_API=false

EDIT:

Helm chart incubator/chartmuseum was moved to stable/chartmuseum on Apr 6, 2018.

Now you need to install helm chart stable/chartmuseum with DISABLE_API: false parameter:

helm install stable/chartmuseum --set env.open.DISABLE_API=false

After that you can perform any operations with its API, for example:

$ curl --data-binary "@mychart-0.1.0.tgz" http://localhost:8080/api/charts
{"saved":true}

$ curl http://localhost:8080/api/charts
{"mychart":[{"name":"mychart","version":"0.1.0","description":"A Helm chart for Kubernetes","apiVersion":"v1","urls":["charts/mychart-0.1.0.tgz"],"created":"2018-02-11T12:51:15.763951001Z","digest":"ae8d7138002d432014dc8638ec37202823e9207445caf08a660d154b26e936ea"}]}
like image 180
nickgryg Avatar answered Oct 05 '22 03:10

nickgryg