rebase: changes as per new controller runtime import

changes as per new controller runtime import

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2024-05-15 09:06:09 +02:00 committed by mergify[bot]
parent 6790633624
commit 7fd2e8935b

View File

@ -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)
}