From e449b8eaf156c387c9619016ca9f107a1c1353c4 Mon Sep 17 00:00:00 2001 From: hzma Date: Mon, 19 Jul 2021 17:22:58 +0800 Subject: [PATCH] delete overlapped var subnet --- pkg/controller/subnet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/subnet.go b/pkg/controller/subnet.go index 6d6ebae1d76..3b4583b6ed0 100644 --- a/pkg/controller/subnet.go +++ b/pkg/controller/subnet.go @@ -828,7 +828,7 @@ func (c *Controller) reconcileNamespaces(subnet *kubeovnv1.Subnet) error { } if changed { sub.Spec.Namespaces = reservedNamespaces - subnet, err = c.config.KubeOvnClient.KubeovnV1().Subnets().Update(context.Background(), sub, metav1.UpdateOptions{}) + _, err = c.config.KubeOvnClient.KubeovnV1().Subnets().Update(context.Background(), sub, metav1.UpdateOptions{}) if err != nil { klog.Errorf("failed to unbind namespace from subnet %s, %v", sub.Name, err) return err