-
Notifications
You must be signed in to change notification settings - Fork 195
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
Add optional in-memory cache of HelmRepository index files #626
Conversation
.DS_Store should be checked in here. |
0551e72
to
7865323
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we remove the cache entry on HelmRepository finalization?
My assumption was that if a source is unavailable, the chart reconciliation fails early, before attempting to load the index. hence we just wait for the corresponding cache entry expiration and deletion. |
7865323
to
4bcbe15
Compare
Nit:
General comment, but not blocking for introduction: I feel that the introduction of this cache could partly eliminate the need of some of the simpler and naive caching approaches introduced by me, thereby simplifying the overall code. This might be worth looking into as a follow up. |
aaf287c
to
b36c837
Compare
b94bdbc
to
26bfa28
Compare
This PR is to introduce the cache. There will be follow up work, but for now I want to merge it so users can start testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @souleb 🥇
26bfa28
to
15ab075
Compare
3a633e4
to
435359b
Compare
e561349
to
d2761b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with this for experimental introduction, thanks a lot @souleb, and looking forward to the further improvements 🥇 🙇
After we release flux with this change, we need to update the bootstrap cheatsheet to show users how to enable the cache. |
I will create an issue for that. |
If implemented, will provide users with a way to cache index files. This addresses issues where the index file is loaded and unmarshalled in concurrent reconciliation resulting in a heavy memory footprint. The caching strategy used is cache aside, and the cache is a k/v store with expiration. The cache number of entries and ttl for entries are configurable. The cache is optional and is disabled by default Signed-off-by: Soule BA <soule@weave.works>
Signed-off-by: Soule BA <soule@weave.works>
Signed-off-by: Soule BA <soule@weave.works>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
If implemented, will provide users with a way to cache index files.
This addresses issues where the index file is loaded and unmarshalled in
concurrent reconciliation resulting in a heavy memory footprint.
The caching strategy used is cache aside, and the cache is a k/v store
with expiration.
The cache number of entries and ttl for entries are configurable.
The cache is optional and is disabled by default
Signed-off-by: Soule BA soule@weave.works
Fix: fluxcd/flux2#2072