kubernetes-ingress-controller icon indicating copy to clipboard operation
kubernetes-ingress-controller copied to clipboard

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

Open programmer04 opened this issue 9 months ago • 0 comments

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 avatar May 09 '24 11:05 programmer04