Skip to content

Commit

Permalink
fix: golangci lint
Browse files Browse the repository at this point in the history
Signed-off-by: bobz965 <[email protected]>
  • Loading branch information
zbb88888 committed Jan 24, 2024
1 parent e4e3e17 commit 0131961
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pkg/controller/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,16 +496,17 @@ func (c *Controller) createOrUpdateCrdIPs(ipCRName, podName, ip, mac, subnetName
return nil
}

_, err := c.config.KubeOvnClient.KubeovnV1().IPs().Update(context.Background(), newIPCR, metav1.UpdateOptions{})
ipCR, err = c.config.KubeOvnClient.KubeovnV1().IPs().Update(context.Background(), newIPCR, metav1.UpdateOptions{})
if err != nil {
err := fmt.Errorf("failed to update ip CR %s: %v", newIPCR.Name, err)
klog.Error(err)
return err
}
if err := c.handleAddIPFinalizer(ipCR, util.ControllerName); err != nil {
klog.Errorf("failed to handle add ip finalizer %v", err)
return err
}
}

if err := c.handleAddIPFinalizer(ipCR, util.ControllerName); err != nil {
klog.Errorf("failed to handle add ip finalizer %v", err)
return err
}

return nil
Expand Down

0 comments on commit 0131961

Please sign in to comment.