// SetupWithManager adds the reconciler to the manager, so that it gets started when the manager is started.
SetupWithManager adds the reconciler to the manager, so that it gets started when the manager is started.
// SetupWithManager adds the reconciler to the manager so that it gets started when the manager is started .
func (r *ProgressiveSyncReconciler) SetupWithManager(mgr ctrl.Manager) error {
	return ctrl.NewControllerManagedBy(mgr).
		For(&syncv1alpha1.ProgressiveSync{}, builder.WithPredicates(predicate.GenerationChangedPredicate{})).
		Watches(
			&source.Kind{Type: &argov1alpha1.Application{}},
			handler.EnqueueRequestsFromMapFunc(r.requestsForApplicationChange)).
		Watches(
			&source.Kind{Type: &corev1.Secret{}}, handler.EnqueueRequestsFromMapFunc(r.requestsForSecretChange),
			builder.WithPredicates(predicate.Or(predicate.GenerationChangedPredicate{}, predicate.LabelChangedPredicate{}))).
		Complete(r)
}
func ( r * ProgressiveSyncReconciler ) SetupWithManager ( mgr ctrl . Manager ) error { return ctrl . NewControllerManagedBy ( mgr ) . For ( & syncv1alpha1 . ProgressiveSync { } , builder . WithPredicates ( predicate . GenerationChangedPredicate { } ) ) . Watches ( & source . Kind { Type : & argov1alpha1 . Application { } } , handler . EnqueueRequestsFromMapFunc ( r . requestsForApplicationChange ) ) . Watches ( & source . Kind { Type : & corev1 . Secret { } } , handler . EnqueueRequestsFromMapFunc ( r . requestsForSecretChange ) , builder . WithPredicates ( predicate . Or ( predicate . GenerationChangedPredicate { } , predicate . LabelChangedPredicate { } ) ) ) . Complete ( r ) }
SetupWithManager adds the reconciler to the manager, so that it gets started when the manager is started.
SetupWithManager adds the reconciler to the manager so that it gets started when the manager is started .