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

Make a new snapshot of the store only when it differs from previous snapshot #5996

Closed
Tracked by #5854
programmer04 opened this issue May 9, 2024 · 0 comments · Fixed by #6017
Closed
Tracked by #5854

Make a new snapshot of the store only when it differs from previous snapshot #5996

programmer04 opened this issue May 9, 2024 · 0 comments · Fixed by #6017
Assignees
Labels
priority/high release/required it is required that this be resolved before releasing
Milestone

Comments

@programmer04
Copy link
Member

programmer04 commented May 9, 2024

Making a snapshot of the Kubernetes store store.Storer may be expensive, especially for large configs also it impacts the memory footprint of KIC, thus do it only when it differs from the previous one.

Calculate the hash from all objects in a store and compare it with a hash preserved for the currently used snapshot.

An instance of an object (resource) in K8s can be uniquely identified by one of the below:

so one of the above has to be included alongside resourceVersion that makes change tracking possible.


For actual implementation worth checking library is hashstructure

@programmer04 programmer04 added this to the KIC v3.2.x milestone May 9, 2024
@programmer04 programmer04 changed the title Make snapshot of the store only when it differs from previous snapshot Make a new snapshot of the store only when it differs from previous snapshot May 9, 2024
@randmonkey randmonkey added the release/required it is required that this be resolved before releasing label May 13, 2024
@programmer04 programmer04 self-assigned this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/high release/required it is required that this be resolved before releasing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants