diff --git a/internal/controller/persistentvolume/persistentvolume.go b/internal/controller/persistentvolume/persistentvolume.go index d83fb0a4f..433bf616b 100644 --- a/internal/controller/persistentvolume/persistentvolume.go +++ b/internal/controller/persistentvolume/persistentvolume.go @@ -82,7 +82,11 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { } // Watch for changes to PersistentVolumes - err = c.Watch(source.Kind(mgr.GetCache(), &corev1.PersistentVolume{}), &handler.EnqueueRequestForObject{}) + err = c.Watch(source.Kind( + mgr.GetCache(), + &corev1.PersistentVolume{}, + &handler.TypedEnqueueRequestForObject[*corev1.PersistentVolume]{}), + ) if err != nil { return fmt.Errorf("failed to watch the changes: %w", err) }