Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use cached data to validate policy admissions (#7991)
Currently, the policy-controller's admission server issues a request to Kubernetes every admission review request. This is unnecessary, since we already maintain a cache of the relevant data structure in the process. This change updates the admission server to hold a reference to the process's `Index` data structure. Each time an admission request is received, the admission server accesses the index to lookup servers that already exist in the cluster. Note that it's possible that the index may not be 100% up to date, as event delivery can be delayed. I think it's okay to make the tradeoff that the admission controller is best-effort in favor of reducing resource usage. Signed-off-by: Oliver Gould <ver@buoyant.io>
- Loading branch information
Showing
8 changed files
with
92 additions
and
88 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
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.