func (r *PolicySetReconciler) SetupWithManager(mgr ctrl.Manager) error {
	return ctrl.NewControllerManagedBy(mgr).
		Named(ControllerName).
		For(
			&policyv1beta1.PolicySet{},
			builder.WithPredicates(policySetPredicateFuncs)).
		Watches(
			&source.Kind{Type: &policyv1.Policy{}},
			handler.EnqueueRequestsFromMapFunc(policyMapper(mgr.GetClient())),
			builder.WithPredicates(policyPredicateFuncs)).
		Watches(
			&source.Kind{Type: &policyv1.PlacementBinding{}},
			handler.EnqueueRequestsFromMapFunc(placementBindingMapper(mgr.GetClient())),
			builder.WithPredicates(pbPredicateFuncs)).
		Watches(
			&source.Kind{Type: &appsv1.PlacementRule{}},
			handler.EnqueueRequestsFromMapFunc(placementRuleMapper(mgr.GetClient()))).
		Watches(
			&source.Kind{Type: &clusterv1beta1.PlacementDecision{}},
			handler.EnqueueRequestsFromMapFunc(placementDecisionMapper(mgr.GetClient()))).
		Complete(r)
}
// SetupWithManager sets up the controller with the Manager.
SetupWithManager sets up the controller with the Manager.
// SetupWithManager sets up the controller with the Manager .
func (r *PolicySetReconciler) SetupWithManager(mgr ctrl.Manager) error {
	return ctrl.NewControllerManagedBy(mgr).
		Named(ControllerName).
		For(
			&policyv1beta1.PolicySet{},
			builder.WithPredicates(policySetPredicateFuncs)).
		Watches(
			&source.Kind{Type: &policyv1.Policy{}},
			handler.EnqueueRequestsFromMapFunc(policyMapper(mgr.GetClient())),
			builder.WithPredicates(policyPredicateFuncs)).
		Watches(
			&source.Kind{Type: &policyv1.PlacementBinding{}},
			handler.EnqueueRequestsFromMapFunc(placementBindingMapper(mgr.GetClient())),
			builder.WithPredicates(pbPredicateFuncs)).
		Watches(
			&source.Kind{Type: &appsv1.PlacementRule{}},
			handler.EnqueueRequestsFromMapFunc(placementRuleMapper(mgr.GetClient()))).
		Watches(
			&source.Kind{Type: &clusterv1beta1.PlacementDecision{}},
			handler.EnqueueRequestsFromMapFunc(placementDecisionMapper(mgr.GetClient()))).
		Complete(r)
}
func ( r * PolicySetReconciler ) SetupWithManager ( mgr ctrl . Manager ) error { return ctrl . NewControllerManagedBy ( mgr ) . Named ( ControllerName ) . For ( & policyv1beta1 . PolicySet { } , builder . WithPredicates ( policySetPredicateFuncs ) ) . Watches ( & source . Kind { Type : & policyv1 . Policy { } } , handler . EnqueueRequestsFromMapFunc ( policyMapper ( mgr . GetClient ( ) ) ) , builder . WithPredicates ( policyPredicateFuncs ) ) . Watches ( & source . Kind { Type : & policyv1 . PlacementBinding { } } , handler . EnqueueRequestsFromMapFunc ( placementBindingMapper ( mgr . GetClient ( ) ) ) , builder . WithPredicates ( pbPredicateFuncs ) ) . Watches ( & source . Kind { Type : & appsv1 . PlacementRule { } } , handler . EnqueueRequestsFromMapFunc ( placementRuleMapper ( mgr . GetClient ( ) ) ) ) . Watches ( & source . Kind { Type : & clusterv1beta1 . PlacementDecision { } } , handler . EnqueueRequestsFromMapFunc ( placementDecisionMapper ( mgr . GetClient ( ) ) ) ) . Complete ( r ) }
SetupWithManager sets up the controller with the Manager.
SetupWithManager sets up the controller with the Manager .