Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16315 from pravisankar/router-change-to-informer
Automatic merge from submit-queue. Replaced event queue based watching resources in router with shared informers - 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: * Informers are started with no registered event handlers * Wait for all informers to be synced * Block router reload * Get list of items from informers store and process manually * Perform router reload * Register router event handlers This guarantees first router sync is performed after processing all existing items. - Subsequent router syncs rely on informer syncing sate and uses rate limiter to coalesce changes. - Deleted eventQueue, no longer used Trello card: https://trello.com/c/y6SFvOA7
- Loading branch information