Closed yidaqiang closed 1 year ago
Hi @yidaqiang, thanks for reporting the issue.
According to Chartmuseum docs, Charts API is exposed under /api/charts
. Do you have your deployment behind a proxy or virtual host? In that case, it would make sense to prepend the virtual host name, not the whole URL.
Can you post here the relevant part of your config.yaml
file?
Hi @jiparis ,Thanks for your response.
Here is my config.yaml
relocateContainerImages: false
source:
repo:
kind: CHARTMUSEUM
url: https://chartmuseum.server.com/serverrepo
target:
repoName: backuprepo
repo:
kind: CHARTMUSEUM
url: https://chartmuseum.backup.com/backuprepo
auth:
username: user
password: password
#containerRegistry: docker.io
#containerRepository: yishuida
skipCharts:
- common
- chart-test
In Chartmuseum docs, Here is a sample command:
curl --data-binary "@mychart-0.1.0.tgz" http://localhost:8080/api/charts
But in fact, The following commands are used
curl -u username:password --data-binary "@mychart-0.1.0.tgz" http://localhost:8080/mysql-repo/api/charts
# or
curl -u username:password --data-binary "@mychart-0.1.0.tgz" http://localhost:8080/api/mysql-repo/charts
Only use /api/charts
without myrepo
, chartmuseum returen { "error": "not found" }
See the link below for detailed logic
I fixed the problem,and rebuild docker image yishuida/charts-syncer:v0.19.0
. Everything works fine when I use this image.
PS: Using your methods deploy to k8s
Hi @yidaqiang, sorry for the late response. Yes, you are right, it looks like your approach would fix the issue. Can you please create a PR for the team to review?
Thank you for your contribution!
When I sync chart from chartmuseum to chartmuseum, Problems encountered.
log is:
I found the place where the bug occurred
https://github.com/bitnami-labs/charts-syncer/blob/6d18fc98aab230beb0aa7870b36412ee971923ba/pkg/client/repo/chartmuseum/chartmuseum.go#L59
Target repo url is https://chart.exmaple.com/myrepo, After execution
u.Path = "/api/charts"
, u.Path is/api/charts
, Not expected/myrepo/api/charts
So The correct code is
Is this appropriate, Do I need to create PR ?