Antrea NetworkPolicy and K8s NetworkPolicy collides if have the same name and namespace #1173
Labels
kind/bug
Categorizes issue or PR as related to a bug.
Milestone
Describe the bug
Between controller and agent, Antrea NetworkPolicy and K8s NetworkPolicy are both converted to internal networkpolicy type for consumption. The keyFunc for the internal np store is defined as 'namespace/name' (L125, pkg/controller/networkpolicy/store/networkpolicy.go). Since both resources are namespaced, K8s NP and ANP with the same name in the same namespace will result in the same key generated for internal networkpolicy, while the spec of those two policies will be different. Hence, the controller will not be able to distinguish a ADD event for a new, same named policy and a UPDATE event for the original policy.
Proposed Solution
#1084 (comment)
The text was updated successfully, but these errors were encountered: