helm / chartmuseum

helm chart repository server

Home Page:https://chartmuseum.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why add/remove a *.tgz to local storage don't not reflect in index-cache.yaml And GET /index.yaml.

scorpinxia opened this issue · comments

Question description

there is a description In official website docs:

If you manually add/remove a .tgz package from storage, it will be immediately reflected in GET /index.yaml.

  • But In my local machine ,I use docker image docker.io/library/chartmuseum:v0.14.0 and mount /charts in my local disk。
    • Firstly, I use POST /api/charts to upload chart such as mysql-v1.5.0.tgz 。 it works and immediately reflected in GET /index.yaml and also in my disk。 (I also try helm cm-push ,It can also work.)
    • Secondly, I manually remove the local volumed disk mysql-v1.5.0.tgz, but I still can see it in GET /index.yaml and index-cache.yaml . At the same time ,I tried manually add chart like ingress-nginx-v1.5.0.tgz in local volumed
    • Finally, I tryied to exec chartmuseum --gen-index in container , but it still don't work.(by the way restart the image can work fine.

👋 @scorpinxia that description in the docs is out of date for more recent versions of ChartMuseum. I’ll get that updated.

You can however set the —cache-interval flag to rebuild the cache from the storage on a cadence.

Otherwise, a PR was recently merged to add a flag called always-regenerate-chart-index so the cache is rebuilt from storage every request to /index.yaml. This has not been included in a release yet but can be used with the canary image tag.

👋 @scorpinxia that description in the docs is out of date for more recent versions of ChartMuseum. I’ll get that updated.

You can however set the —cache-interval flag to rebuild the cache from the storage on a cadence.

Otherwise, a PR was recently merged to add a flag called always-regenerate-chart-index so the cache is rebuilt from storage every request to /index.yaml. This has not been included in a release yet but can be used with the canary image tag.

@cbuto

Thanks for your reply. Ok, I will try to set —cache-interval flag . By the way, if I only use local disk , do you mean that I can also revert to previous version image (which one) or [feat/keep-chart-up-date-option]
https://github.com/helm/chartmuseum/tree/feat/keep-chart-up-date-option

Well , thank you again.