diff --git a/docs/antrea-network-policy.md b/docs/antrea-network-policy.md index 6c5144b027a..b0f705907ab 100644 --- a/docs/antrea-network-policy.md +++ b/docs/antrea-network-policy.md @@ -1100,11 +1100,11 @@ spec: - fqdn: "svcA.default.svc.cluster.local" ``` -## Node Selector +## Node Selector NodeSelector selects certain Nodes which match the label selector. It adds Node IPs to egress rules in `to` field or ingress rules in `from` filed. -The following rule applies to Pods with label `app=antrea-test-app` and will `Drop` egress traffic to +The following rule applies to Pods with label `app=antrea-test-app` and will `Drop` egress traffic to Nodes which have the labels `node-role.kubernetes.io/control-plane`. ```yaml @@ -1129,7 +1129,6 @@ spec: port: 6443 ``` - ## toServices instruction A combination of Service name and Service Namespace can be used in `toServices` to refer to a Service. diff --git a/plugins/octant/go.mod b/plugins/octant/go.mod index 3e86cec70db..c02d974da1c 100644 --- a/plugins/octant/go.mod +++ b/plugins/octant/go.mod @@ -40,7 +40,6 @@ require ( github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect - github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.3 // indirect github.com/google/go-cmp v0.5.5 // indirect diff --git a/test/e2e/antreapolicy_test.go b/test/e2e/antreapolicy_test.go index ac6eb840130..e74668d6166 100644 --- a/test/e2e/antreapolicy_test.go +++ b/test/e2e/antreapolicy_test.go @@ -2541,9 +2541,7 @@ func testToServices(t *testing.T) { func testACNPNodeSelector(t *testing.T) { builder := &ClusterNetworkPolicySpecBuilder{} builder = builder.SetName("test-acnp-drop-egress-control-plane"). - SetPriority(1.0). - SetAppliedToGroup([]ACNPAppliedToSpec{{NSSelector: map[string]string{}}}) - controlPlaneNodeName() + SetPriority(1.0) nodeSelector := metav1.LabelSelector{MatchLabels: map[string]string{"kubernetes.io/hostname": controlPlaneNodeName()}} builder.AddNodeSelectorRule(&nodeSelector, v1.ProtocolTCP, &p6443, "egress-control-plane-drop", []ACNPAppliedToSpec{{NSSelector: map[string]string{"ns": "x"}, PodSelector: map[string]string{"pod": "a"}}}, @@ -2554,7 +2552,7 @@ func testACNPNodeSelector(t *testing.T) { "x/a", controlPlaneNodeIPv4(), 6443, - Rejected, + Dropped, }, { "x/b",