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

POST /api/charts returns 404 not found #566

Closed
mkroman opened this issue Mar 18, 2022 · 2 comments
Closed

POST /api/charts returns 404 not found #566

mkroman opened this issue Mar 18, 2022 · 2 comments

Comments

@mkroman
Copy link

mkroman commented Mar 18, 2022

Hi,

When I try to upload a new chart I just get the following response:

% curl --data-binary "@chart-0.1.1.tgz" --user "${HELM_REPO_USERNAME}:${HELM_REPO_PASSWORD}" https://host.com/api/charts
{"error":"not found"}

This is all what comes up in chartmuseums output (DEBUG=true):

{"L":"DEBUG","T":"2022-03-18T18:25:10.225Z","M":"[132] Incoming request: /api/charts","reqID":"1400f9ce-f119-44ec-bcc5-ba6fed36e3cc"}
{"L":"WARN","T":"2022-03-18T18:25:10.225Z","M":"[132] Request served","path":"/api/charts","comment":"","clientIP":"<redacted>","method":"POST","statusCode":404,"latency":"192.389µs","reqID":"1400f9ce-f119-44ec-bcc5-ba6fed36e3cc"}

I have confirmed that basic auth works:

% curl --user "${HELM_REPO_USERNAME}:${HELM_REPO_PASSWORD}" https://host.com/index.yaml
apiVersion: v1
entries: {}
generated: "2022-03-18T18:15:41Z"
serverInfo: {}
% curl --user "invalid:user" https://host.com/index.yaml
{"error":"unauthorized"}

I am using the amazon storage backend with DigitalOcean spaces. These are my values for the ChartMuseum Helm chart:

chartmuseum:
  image:
    tag: "v0.14.0"
  env:
    open:
      DEBUG: true
      # -- Use S3 as a backing storage.
      STORAGE: amazon
      STORAGE_AMAZON_BUCKET: company-charts
      STORAGE_AMAZON_ENDPOINT: https://fra1.digitaloceanspaces.com
      STORAGE_AMAZON_REGION: us-east-1
      STORAGE_AMAZON_PREFIX: ""
    existingSecret: chartmuseum-creds
    existingSecretMappings:
      BASIC_AUTH_USER: basic-auth-user
      BASIC_AUTH_PASS: basic-auth-pass
      AWS_ACCESS_KEY_ID: aws-access-key
      AWS_SECRET_ACCESS_KEY: aws-secret-access-key
  service:
    externalPort: 8080

This is the chartmuseum-creds secret:

apiVersion: v1
kind: Secret
metadata:
  name: chartmuseum-creds
  namespace: chartmuseum
data:
  aws-access-key: <redacted>
  aws-secret-access-key: <redacted>
  basic-auth-pass: <redacted>
  basic-auth-user: <redacted>

I'm wondering if I'm doing something wrong, or if maybe writing to the storage silently fails?

GET /health:

{"healthy":true}

GET /info:

{"version":"0.14.0"}
@cbuto
Copy link
Contributor

cbuto commented Mar 19, 2022

hello @mkroman 👋, I think your problem might be due to the API being disabled by default in the helm chart. Can you try enabling the API by setting env.open.DISABLE_API=false?

I think there’s some small changes we could make in our docs to make that stand out more!

@mkroman
Copy link
Author

mkroman commented Mar 21, 2022

Hi @cbuto!

That did the trick, thanks a bunch!

I think there’s some small changes we could make in our docs to make that stand out more!

That would be very helpful :)

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