-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't send endpoint profile updates from Server updates when opaquene…
…ss doesn't change (#12013) When the destination controller receives an update for a Server resource, we recompute opaqueness ports for all pods. This results in a large number of updates to all endpoint profile watches, even if the opaqueness doesn't change. In cases where there are many Server resources, this can result in a large number of updates being sent to the endpoint profile translator and overflowing the endpoint profile translator update queue. This is especially likely to happen during an informer resync, since this will result in an informer callback for every Server in the cluster. We refactor the workload watcher to not send these updates if the opaqueness has not changed. This, seemingly simple, change in behavior requires a large code change because: * the current opaqueness state is not stored on workload publishers and must be added so that we can determine if the opaqueness has changed * storing the opaqueness in addition to the other state we're storing (pod, ip, port, etc.) means that we are not storing all of the data represented by the Address struct * workload watcher uses a `createAddress` func to dynamically create an Address from the state it stores * now that we are storing the Address as state, creating Addresses dynamically is no longer necessary and we can operate on the Address state directly * this makes the workload watcher more similar to other watchers and follow a common pattern * it also fixes some minor correctness issues: * pods that did not have the ready status condition were being considered when they should not have been * updates to ExternalWorkload labels were not being considered Signed-off-by: Alex Leong <[email protected]>
- Loading branch information
Showing
4 changed files
with
130 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.