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

fix(): Avoid unnecessary reconcile cycles for slice gw #416

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

bharath-avesha
Copy link
Contributor

The slice gw reconciler is in a perpetual reconcile cycle. There are places where the CR update func is being called in a for loop. And reflect.DeepEqual is being used to compare two lists that are never guaranteed to have their elements in the same order, this causes unnecessary update from the server worker cluster to the controller, which triggers an update on the client cluster. The reconciler also watches for node updates blindly, triggering the reconcile func every time there is an update to the Node object. The update could be because of the cluster provider adding or modifying labels and annotations. We need a granular check on the node update and trigger the reconciler func only if needed.

Due to the reconcile storm, updates are not being handled in a timely manner, and sometimes it is so bad that the reconcile events get queued for days. This was observed on a customer cluster where an update to the CR was not handled for 15 days.

@Rahul-D78
Copy link
Contributor

Rahul-D78 commented Jan 16, 2025

Looks Good to me, we can also try to always make sure what ever updates we are doing to the CR is always sorted. so if we are doing checks further we can avoid this issue of DeepEqual.

But that we can do later...

@bharath-avesha bharath-avesha merged commit 0294add into master Jan 16, 2025
11 checks passed
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

Successfully merging this pull request may close these issues.

4 participants