diff --git a/pkg/controller/gc.go b/pkg/controller/gc.go index 327eb82c1c5..e80817b7f7e 100644 --- a/pkg/controller/gc.go +++ b/pkg/controller/gc.go @@ -501,11 +501,15 @@ func (c *Controller) gcLoadBalancer() error { return nil } - lb, err := c.ovnClient.GetLoadBalancer(lbName, false) + lb, err := c.ovnClient.GetLoadBalancer(lbName, true) if err != nil { klog.Errorf("get LB %s: %v", lbName, err) return err } + if lb == nil { + klog.Infof("load balancer %q not found", lbName) + return nil + } for vip := range lb.Vips { if !svcVips.Has(vip) {