Skip to content

Conversation

@IfSentient
Copy link
Contributor

What Changed? Why?

If an update event hits the k8s.InformerController where the ResourceVersion of the object is unchanged, convert it into a Resync event when propagating it to any reconcilers. This is necessary to properly propagate cache resync events as resyncs, rather than updates, as the cache resync in DeltaFIFO sends a Sync event to the processor, which gets converted into an Update event since it already exists in the cache. The event is distributed with isSync set to true, but that gets swallowed by the processor and turned into a simple update, because the OnUpdate method in the handler interface doesn't have a way of setting anything besides the new and old version of the object. When we receive the event in the InformerController update handler, we can repeat the logic of "is the RV changed?" that the SharedInformer does to convert the event back into a Resync.

How was it tested?

Unit tests have been added for reconciler Update and Sync event propagation. Also tested with a local project where cache resync was set to 30 seconds, and saw the initial add event when creating a new object, then resyncs every 30 seconds.

Where did you document your changes?

No additional documentation, as it is a bug that resync events are handled as updates.

Notes to Reviewers

@IfSentient IfSentient requested a review from a team as a code owner November 13, 2025 17:11
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.

1 participant