-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(policy): use new compute for rules and fix rules intersect (#12340)
## Motivation 1. When I went through the policy matching subset `Intersect` method, I found the behavior is incorrect with one case 2. Rewrite the rule's `Compute` method to use the new `ContainsElement` method instead of using the old `IsSubset` method ## Implementation information Introduce one new type `type Element map[string]string` for differentiation by `IsSubset`. ## Supporting documentation <!-- Is there a MADR? An Issue? A related PR? --> Fix #12319 Fix #12273 <!-- > Changelog: skip --> <!-- Uncomment the above section to explicitly set a [`> Changelog:` entry here](https://github.com/kumahq/kuma/blob/master/CONTRIBUTING.md#submitting-a-patch)? --> --------- Signed-off-by: Icarus Wu <[email protected]> Signed-off-by: Ilya Lobkov <[email protected]> Co-authored-by: Ilya Lobkov <[email protected]>
- Loading branch information
1 parent
ba869a0
commit 3a00363
Showing
22 changed files
with
683 additions
and
125 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
Oops, something went wrong.