helm / chartmuseum

helm chart repository server

Home Page:https://chartmuseum.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot push a tar.gz repo file to http://chartmuseum.127.0.0.1.nip.io/api/charts

cmoulliard opened this issue · comments

Issue

The chartmuseum HTTP Server running as a pod on kubernetes returns an error HTTP 404 when we try to push a tar.gz file.

Log of the server
{"L":"WARN","T":"2023-03-21T09:32:28.166Z","M":"[715] Request served","path":"/api/charts/index.yaml","comment":"","clientIP":"172.27.0.1","method":"GET","statusCode":404,
"latency":"32.423µs","reqID":"260ac848575bf5287264086661e288db"}

Command executed

helm cm-push --debug ./target/helm/kubernetes/primaza-app-0.0.1-SNAPSHOT.tar.gz http://chartmuseum.127.0.0.1.nip.io/api/charts
Error: 404: not found

Full server log

{"L":"INFO","T":"2023-03-21T08:33:19.872Z","M":"Starting ChartMuseum","host":"0.0.0.0","port":8080}
{"L":"WARN","T":"2023-03-21T09:24:31.882Z","M":"[616] Request served","path":"/","comment":"","clientIP":"172.27.0.1","method":"POST","statusCode":404,"latency":"1.352141m
s","reqID":"75235e4ed5877f499f6630840e50aaeb"}
{"L":"INFO","T":"2023-03-21T09:27:50.950Z","M":"[657] Request served","path":"/index.yaml","comment":"","clientIP":"172.27.0.1","method":"GET","statusCode":200,"latency":"
6.215625ms","reqID":"c5c9e280c34ca5fa32dd88790e601862"}
{"L":"WARN","T":"2023-03-21T09:27:50.970Z","M":"[658] Request served","path":"/api/charts","comment":"","clientIP":"172.27.0.1","method":"POST","statusCode":404,"latency":
"835.032µs","reqID":"5b11c6f8acc3bd5454fcca5b7fa3b0b5"}
{"L":"INFO","T":"2023-03-21T09:28:10.341Z","M":"[663] Request served","path":"/","comment":"","clientIP":"172.27.0.1","method":"GET","statusCode":200,"latency":"19.339µs",
"reqID":"ce6b40ed5e5a6f39a20b88909b1c133a"}
{"L":"WARN","T":"2023-03-21T09:32:28.166Z","M":"[715] Request served","path":"/api/charts/index.yaml","comment":"","clientIP":"172.27.0.1","method":"GET","statusCode":404,
"latency":"32.423µs","reqID":"260ac848575bf5287264086661e288db"}
{"L":"WARN","T":"2023-03-21T09:37:41.337Z","M":"[779] Request served","path":"/api/charts/index.yaml","comment":"","clientIP":"172.27.0.1","method":"GET","statusCode":404,
"latency":"56.344µs","reqID":"2a3c1bc94cb297b0bdace543b3f96b9c"}

FYI: I can access the web ui at http://chartmuseum.127.0.0.1.nip.io/ and got as message

Welcome to ChartMuseum!
If you see this page, the ChartMuseum web server is successfully installed and working.

For online documentation and support please refer to the GitHub project.
Thank you for using ChartMuseum.

I can also get the index.yaml file

http http://chartmuseum.127.0.0.1.nip.io/index.yaml
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 76
Content-Type: application/x-yaml
Date: Tue, 21 Mar 2023 09:54:36 GMT
X-Request-Id: fa85690c6cdfdf888141b8f63384340b

apiVersion: v1
entries: {}
generated: "2023-03-21T09:44:16Z"
serverInfo: {}

How to reproduce

helm repo add chartmuseum https://chartmuseum.github.io/charts
cat <<EOF > values.yml
ingress:
  enabled: true
  pathType: Prefix
  hosts:
   - name: chartmuseum.127.0.0.1.nip.io
env:
  open:
    STORAGE: local
    DEBUG: true
persistence:
  enabled: true
  accessMode: ReadWriteOnce
  size: 1Gi
EOF

helm install chartmuseum chartmuseum/chartmuseum -f values.yml -n museum --create-namespace
  • Try to push a chart repo

@cmoulliard yep, the API is disabled by default so you'll need to enable it. glad you figured it out! closing for now as it looks like you are all set