Skip to content

Commit

Permalink
fix subnet finalizer (#3004)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Jul 3, 2023
1 parent 1c9fc6a commit 66d0e43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func (c *Controller) handleSubnetFinalizer(subnet *kubeovnv1.Subnet) (bool, erro
}

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

0 comments on commit 66d0e43

Please sign in to comment.