Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced event queue based watching resources in router with shared i…
…nformers - Custom shared informer is used to leverage namespace, label and field filtering. (Auto generated shared informer does not allow this) - Listing resources by shared informers doesn't order by resource version/creation time. So custom lister for routes is used to order the route list by creation time and this will allow oldest route to be processed before new route to claim the host name. - Synchronization with the informer queue and cache is a bit difficult as the cache could have newer changes than what was pushed on to the queue. Luckily We only care about the first sync to avoid 503 status code for routes. - Handling first sync: Initially all existing items in the cache are pushed as ADD events, so router will get at least one event for the item even if the cache is new (MODIFIED or DELETED event on existing item). Using this info and maintaining consumed count, first router sync op is performed. - Subsequent router syncs rely on informer syncing sate and uses rate limiter to coalesce changes.
- Loading branch information