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

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

Closed
cmoulliard opened this issue Mar 21, 2023 · 2 comments

Comments

@cmoulliard
Copy link

cmoulliard commented Mar 21, 2023

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
Copy link
Author

Problem fixed when I changed this property: https://github.com/chartmuseum/charts/blob/main/src/chartmuseum/values.yaml#L75-L76

@cbuto
Copy link
Contributor

cbuto commented Mar 21, 2023

@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

@cbuto cbuto closed this as completed Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants