Skip to content

Commit 54a0b1a

Browse files
committed
fix subnet finalizer (#3004)
1 parent f3be5d1 commit 54a0b1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/subnet.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ func (c *Controller) handleSubnetFinalizer(subnet *kubeovnv1.Subnet) (bool, erro
444444
}
445445

446446
u2oInterconnIP := subnet.Status.U2OInterconnectionIP
447-
if !subnet.DeletionTimestamp.IsZero() && usingIps == 0 || (usingIps == 1 && u2oInterconnIP != "") {
447+
if !subnet.DeletionTimestamp.IsZero() && (usingIps == 0 || (usingIps == 1 && u2oInterconnIP != "")) {
448448
subnet.Finalizers = util.RemoveString(subnet.Finalizers, util.ControllerName)
449449
if _, err := c.config.KubeOvnClient.KubeovnV1().Subnets().Update(context.Background(), subnet, metav1.UpdateOptions{}); err != nil {
450450
klog.Errorf("failed to remove finalizer from subnet %s, %v", subnet.Name, err)

0 commit comments

Comments
 (0)