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

Reload list of charts from persistence layer (disk, s3, etc) #654

Open
migueleliasweb opened this issue Jan 6, 2023 · 10 comments
Open

Reload list of charts from persistence layer (disk, s3, etc) #654

migueleliasweb opened this issue Jan 6, 2023 · 10 comments

Comments

@migueleliasweb
Copy link

Hi all,

Is there a way to reload the list of available charts from disk without restarting the pod?

@migueleliasweb
Copy link
Author

Possibly related to: #562

@scbizu
Copy link
Contributor

scbizu commented Jan 8, 2023

Hi @migueleliasweb , we open #562 mainly for the replica deployment , if you deploy in the single instance , you should not restart the storage backend , we have the ticker to load your charts into the cache .

@migueleliasweb
Copy link
Author

Hi @scbizu , thanks for que swift reply!

So, just to clarify. Are you saying that if I manually add a chart to the persistence layer (let's say a mount using the local option) I shouldn't need to restart the chartmuseum pod to pick the new chart?

@scbizu
Copy link
Contributor

scbizu commented Jan 9, 2023

@migueleliasweb Yes , if you just have a single instance of chartmuseum.

@migueleliasweb
Copy link
Author

Interesting!

I am running with 2 instances using the local storage option and that might be causing some weird things to happen.

I will test with a single instance! Thanks!

@scbizu
Copy link
Contributor

scbizu commented Jan 12, 2023

Till now , we do not fully support the multi-instance setup , which you said would see some weird things happen .

If you want to setup the multi-instance or the replica , as I mentioned in the #148 (comment) , you should need redis(cluster)'s help .

@migueleliasweb
Copy link
Author

migueleliasweb commented Jan 23, 2023

@scbizu , after a few changes on my setup of Chartmuseum I think I have a somewhat stable installation.

As I really wanted to have a "stateless" chartmuseum install, I used ConfigMap mounts with the tgz charts packaged from helm. I've added a sidecar with the k8s-sidecar container. It basically generates files in disk based on ConfigMaps with specific labels in the cluster.

With this setup, each ChartMuseum pod has their own "storage". Nothing is really shared betweem the pods. This should facilitate the deployment with multiple replicas. At least in theory.

All is working just fine but sometimes I still need to reload the container for it to pick up new changes (new ConfigMaps added or changed). If I delete the pod, the new charts show up nicely.

I've found this code:

But, for some reason, althought it seems to be enabled by default (5m intervals), it doesn't seem to be pickig up the changes.

Any ideas?

Ping @scbizu (sorry to bother).

@migueleliasweb
Copy link
Author

For the moment, the workaround I've found is to add a post hook that issues a rollout restart so the new pods get the new files from disk.

@scbizu
Copy link
Contributor

scbizu commented Jan 29, 2023

@migueleliasweb Sorry for late response , back from China Lunar New Year holiday XD.

You can set the --keep-chart-always-up-to-date to see if it gets better . BTW , you should use our HEAD(ghcr.io/helm/chartmuseum:canary) to enable this option .

See 3ae6ed2

@migueleliasweb
Copy link
Author

I will check this out this week. 👌

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