What can we help you?
Hi, is it possible to configure chart-url?
We're facing problem like that on Rancher that is not capable to parse relative urls.
We tried to edit CHART_URL env variable on common/templates/chartserver/env but it seems does not work.
Any help?
Thanks
We've also run into this when integrating with Spinnaker. Harbor returns relative path where these tools expect a complete URL.
@steven-zou is there a way to enable it to the public_url and return the absolute url?
Harbor index.yaml snippet:
harbor:
- appVersion: 1.7.0
home: https://goharbor.io
....
urls:
- charts/harbor-1.7.0.tgz
version: 1.7.0
Official charts index.yaml snippet:
postgresql:
- appVersion: 10.6.0
home: https://www.postgresql.org/
....
sources:
- https://github.com/bitnami/bitnami-docker-postgresql
urls:
- https://kubernetes-charts.storage.googleapis.com/postgresql-3.9.3.tgz
version: 3.9.3
I was able to trace the cause back to two issues.
First, the harbor helm chart does not support configuring the chart museum URL when installing. Ive opened https://github.com/goharbor/harbor-helm/issues/149 to track it. In the interim you could manually set it after installing, and each upgrade.
The second issue is a bug in chart museum. If you configure the CHART_URL after you have already started the registry without one, it will cache the index.yaml with the relative links. The only solution is to manually delete the cache and restart the service. This will force it to regenerate the cache and will apply the CHART_URL flag. @csturiale this is likely what you ran into. See https://github.com/helm/chartmuseum/issues/157
@darend thanks.
I tried to remove all index-cache.yaml but nothing seems changed.Any hints?
Thank you
@csturiale , habor configures ChartMuseum to use Redis and what ever backing store you select, for us its S3. What I needed to do was:
To purge the redis cache I exec'd into the redis container and used the installed cli to purge all keys in the chart museum database. This configmap will tell you which database it is: https://github.com/goharbor/harbor-helm/blob/master/templates/chartmuseum/chartmuseum-cm.yaml#L12 . It defaults to 3.
Thanks a lot @darend using redis-cli FLUSHALL solved the problem.
We'll enable to use absolute chart URL to instead of the current relative path.
fixed in #7719
Thanks @ninjadq !
Do you know this could be set via the helm chart?
https://github.com/goharbor/harbor/pull/7719/files#diff-7fc964bbc104fe25511e453652fa7f89R69
@csturiale , habor configures ChartMuseum to use Redis and what ever backing store you select, for us its S3. What I needed to do was:
* purge the Redis database for chart museum * delete the cache in S3 * restart chart museumTo purge the redis cache I
exec'd into the redis container and used the installed cli to purge all keys in the chart museum database. This configmap will tell you which database it is: https://github.com/goharbor/harbor-helm/blob/master/templates/chartmuseum/chartmuseum-cm.yaml#L12 . It defaults to3.
@darend I know this was some time ago, but do you have some steps you could supply about the deleting of cache portion? Using redis-cli to FLUSHALL is straightforward, but even after restarting chartmuseum the indexes aren't being regenerated. I even wiped out /chart_storage in the chartmuseum container and restarted the container, the index files still don't pick up the absolute URL setting. Any assistance you can offer would be helpful.
Hi @chipzoller , sorry its been so long since Ive had to triage this I don't remember anything beyond what I wrote above.
@steven-zou Can anyone of the devs provide a working procedure here?
@ninjadq
Please take a look and provide necessary help. Thanks!
@chipzoller could you provide the detailed steps to enable absolute URL?
In the latest version of the harbor, you need to change harbor.yml file to enable the absolute URL first.
Then stop harbor service.
In addition, clear both Redis cache and storage cache file.
Finally, start harbor again.
@ninjadq This is Harbor from Enterprise PKS where there is no harbor.yml file I can find. What's the procedure in that case? Note I also have an SR open with VMware.
Most helpful comment
We'll enable to use absolute chart URL to instead of the current relative path.