diff --git a/pkg/controller/init.go b/pkg/controller/init.go index 6cc2f6d49e50..d943e15047e0 100644 --- a/pkg/controller/init.go +++ b/pkg/controller/init.go @@ -886,7 +886,7 @@ func (c *Controller) syncFinalizers() error { } func (c *Controller) ReplaceFinalizer(cachedObj client.Object) ([]byte, error) { - if slices.Contains(cachedObj.GetFinalizers(), util.DepreciatedFinalizerName) { + if controllerutil.ContainsFinalizer(cachedObj, util.DepreciatedFinalizerName) { newObj := cachedObj.DeepCopyObject().(client.Object) controllerutil.RemoveFinalizer(newObj, util.DepreciatedFinalizerName) controllerutil.AddFinalizer(newObj, util.KubeOVNControllerFinalizer)