// SetupRepository adds a controller that reconciles Repositories.
SetupRepository adds a controller that reconciles Repositories.
// SetupRepository adds a controller that reconciles Repositories .
func SetupRepository(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter) error {
	name := managed.ControllerName(v1alpha1.RepositoryGroupKind)
	return ctrl.NewControllerManagedBy(mgr).
		Named(name).
		WithOptions(controller.Options{
			RateLimiter: ratelimiter.NewDefaultManagedRateLimiter(rl),
		}).
		For(&v1alpha1.Repository{}).
		Complete(managed.NewReconciler(mgr,
			resource.ManagedKind(v1alpha1.RepositoryGroupVersionKind),
			managed.WithExternalConnecter(
				&connector{
					client:      mgr.GetClient(),
					newClientFn: repositories.NewService,
				},
			),
			managed.WithConnectionPublishers(),
			managed.WithReferenceResolver(managed.NewAPISimpleReferenceResolver(mgr.GetClient())),
			managed.WithInitializers(
				managed.NewDefaultProviderConfig(mgr.GetClient()),
				managed.NewNameAsExternalName(mgr.GetClient()),
			),
			managed.WithLogger(l.WithValues("controller", name)),
			managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name)))))
}
func SetupRepository ( mgr ctrl . Manager , l logging . Logger , rl workqueue . RateLimiter ) error { name := managed . ControllerName ( v1alpha1 . RepositoryGroupKind ) return ctrl . NewControllerManagedBy ( mgr ) . Named ( name ) . WithOptions ( controller . Options { RateLimiter : ratelimiter . NewDefaultManagedRateLimiter ( rl ) , } ) . For ( & v1alpha1 . Repository { } ) . Complete ( managed . NewReconciler ( mgr , resource . ManagedKind ( v1alpha1 . RepositoryGroupVersionKind ) , managed . WithExternalConnecter ( & connector { client : mgr . GetClient ( ) , newClientFn : repositories . NewService , } , ) , managed . WithConnectionPublishers ( ) , managed . WithReferenceResolver ( managed . NewAPISimpleReferenceResolver ( mgr . GetClient ( ) ) ) , managed . WithInitializers ( managed . NewDefaultProviderConfig ( mgr . GetClient ( ) ) , managed . NewNameAsExternalName ( mgr . GetClient ( ) ) , ) , managed . WithLogger ( l . WithValues ( " " , name ) ) , managed . WithRecorder ( event . NewAPIRecorder ( mgr . GetEventRecorderFor ( name ) ) ) ) ) }
SetupRepository adds a controller that reconciles Repositories.
SetupRepository adds a controller that reconciles Repositories .