func add(mgr manager.Manager, r reconcile.Reconciler) error {
	// Create a new controller
	c, err := controller.New("localvolumediscovery-controller", mgr, controller.Options{Reconciler: r})
	if err != nil {
		return err
	}

	// Watch for changes to primary resource LocalVolumeDiscovery
	err = c.Watch(&source.Kind{Type: &localv1alpha1.LocalVolumeDiscovery{}}, &handler.EnqueueRequestForObject{})
	if err != nil {
		return err
	}

	// Watch for the child resources
	err = c.Watch(&source.Kind{Type: &appsv1.DaemonSet{}}, &handler.EnqueueRequestForOwner{OwnerType: &localv1alpha1.LocalVolumeDiscovery{}})
	if err != nil {
		return err
	}

	return nil
}
// add adds a new Controller to mgr with r as the reconcile.Reconciler
add adds a new Controller to mgr with r as the reconcile.Reconciler
// add adds a new Controller to mgr with r as the reconcile . Reconciler
func add(mgr manager.Manager, r reconcile.Reconciler) error {
	c, err := controller.New("localvolumediscovery-controller", mgr, controller.Options{Reconciler: r})
	if err != nil {
		return err
	}
	err = c.Watch(&source.Kind{Type: &localv1alpha1.LocalVolumeDiscovery{}}, &handler.EnqueueRequestForObject{})
	if err != nil {
		return err
	}
	err = c.Watch(&source.Kind{Type: &appsv1.DaemonSet{}}, &handler.EnqueueRequestForOwner{OwnerType: &localv1alpha1.LocalVolumeDiscovery{}})
	if err != nil {
		return err
	}
	return nil
}
func add ( mgr manager . Manager , r reconcile . Reconciler ) error { c , err := controller . New ( " " , mgr , controller . Options { Reconciler : r } ) if err != nil { return err } err = c . Watch ( & source . Kind { Type : & localv1alpha1 . LocalVolumeDiscovery { } } , & handler . EnqueueRequestForObject { } ) if err != nil { return err } err = c . Watch ( & source . Kind { Type : & appsv1 . DaemonSet { } } , & handler . EnqueueRequestForOwner { OwnerType : & localv1alpha1 . LocalVolumeDiscovery { } } ) if err != nil { return err } return nil }
add adds a new Controller to mgr with r as the reconcile.Reconciler
add adds a new Controller to mgr with r as the reconcile . Reconciler
// Create a new controller // Watch for changes to primary resource LocalVolumeDiscovery // Watch for the child resources