-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
policy: track rules by resource, not by labels
When upserting a CNP or KNP, we identify existing rules in the repository by a set of labels. However, evaluating this set of labels is expensive, especially as we must check against all label selectors every time we want to add or remove a policy. Rather than using label selectors internally, track policies by owning resource, much the way that prefixes are tracked in the ipcache. Then, when upserting policies, the set of existing rules attached to a given resource can be easily retrieved. The existing behavior is preserved, as it is also exposed via the local gRPC API. However, the k8s handlers no longer use it. Signed-off-by: Casey Callendrello <cdc@isovalent.com>
- Loading branch information
Showing
9 changed files
with
348 additions
and
80 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
Oops, something went wrong.