forked from antrea-io/antrea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Antrea-native Policy with multiple AppliedTo (antrea-io#2084)
A Policy rule may have multiple AppliedToGroups, not all of which select some workloads on the Nodes that the Policy applies to. It's by design that an AppliedToGroup won't be sent to a Node if it doesn't select any workload on it, so agents shouldn't require all AppliedToGroups to be received before it can realize a rule. What's more, it may happen that none of its AppliedToGroups is sent to a Node when the rule itself is being evaluated on the Node if it's sent to the Node because other rules of its parent Policy apply to it. This patch fixes the logic by making the controller install a rule when any of its AppliedToGroups can be populated and all of its AddressGroups can be populated, and uninstall it when none of its AppliedToGroups can be populated.
- Loading branch information
1 parent
d3740fa
commit 24c1161
Showing
7 changed files
with
186 additions
and
68 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.