forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
policy: Simplify logic in addKeyWithchanges()
Restructure addKeyWithChanges to make it easier to understand: - if an old entry exists, the new one is merged to it, honoring the precedence rules for deny, proxy redirection, and auth type. - new entries get their own containers for owners, dependents, and DerivedFromRules so that each entry in MapState has separate containers. This was already the case previously, but the code was had to reason about. - when storing old values for reverting, clone containers so any futher changes in the values in the map will be change the stored old values. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
- Loading branch information
1 parent
807919b
commit c018ac8
Showing
3 changed files
with
52 additions
and
17 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