Skip to content

Commit

Permalink
fix subnet finalizer (#3004)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian authored Jul 3, 2023
1 parent 1236693 commit fe924e9
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 @@ -471,7 +471,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 fe924e9

Please sign in to comment.