-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix name collision between Antrea NetworkPolicy and K8s NetworkPolicy
NetworkPolicy in controlplane API group is the object that consumed by antrea-agents. Both Antrea NetworkPolicy and K8s NetworkPolicy will be converted to it. Currently, the namespace and name of the original NetworkPolicy are copied to the controlplane NetworkPolicy and <Namespace>/<Name> is used as the key func. Therefore, one K8s NetworkPolicy may overwrite the controlplane NetworkPolicy mapping to a Antrea NetworkPolicy that has the same namespace and name. This patch changes to use the UID of the original NetworkPolicy as the name and UID of the controlplane NetworkPolicy and keeps the namespace, name, UID, and type of the original NetworkPolicy in a new field "SourceRef". Besides, the controlplane NetworkPolicy is changed to cluster scoped like AppliedToGroups and AddressGroups.
- Loading branch information
Showing
37 changed files
with
1,350 additions
and
594 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
Oops, something went wrong.