Description
Problem Statement
In case we during the reconciliation update a dependent resource, we receive a new event regarding the change of the dependent resource from the informer. In general this even can be skipped since we know that the state of the target resource is already the desired one. The way to do this would be compare resourceVersion
of the resource of the received event with the resource version of a cached resource (not the current informer cache).
Proposed Solution
One relatively transparent way would be to propagate the resourceVersion
to the informer to cache it. When we receive the next event compare the resources versions, if are the same just skip the event. But either is the same or not, instantly remove the cached resourceVersion
from the cache. This way we don't cache too long the version, and don't have to specially handle the cleanup on resource delete event.
Note that dependent resources could do the propagation automatically, while on low level API this needs to be done explicitly by the implementation.