// Setup adds a controller that reconciles MyType managed resources.
Setup adds a controller that reconciles MyType managed resources.
// Setup adds a controller that reconciles MyType managed resources .
func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter) error {
	name := managed.ControllerName(v1alpha1.ZeebeClusterGroupKind)
	o := controller.Options{
		RateLimiter: ratelimiter.NewDefaultManagedRateLimiter(rl),
	}
	r := managed.NewReconciler(mgr,
		resource.ManagedKind(v1alpha1.ZeebeClusterGroupVersionKind),
		managed.WithExternalConnecter(&connector{
			kube:         mgr.GetClient(),
			usage:        resource.NewProviderConfigUsageTracker(mgr.GetClient(), &apisv1alpha1.ProviderConfigUsage{}),
		}),
		managed.WithLogger(l.WithValues("controller", name)),
		managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))))
	return ctrl.NewControllerManagedBy(mgr).
		Named(name).
		WithOptions(o).
		For(&v1alpha1.ZeebeCluster{}).
		Complete(r)
}
func Setup ( mgr ctrl . Manager , l logging . Logger , rl workqueue . RateLimiter ) error { name := managed . ControllerName ( v1alpha1 . ZeebeClusterGroupKind ) o := controller . Options { RateLimiter : ratelimiter . NewDefaultManagedRateLimiter ( rl ) , } r := managed . NewReconciler ( mgr , resource . ManagedKind ( v1alpha1 . ZeebeClusterGroupVersionKind ) , managed . WithExternalConnecter ( & connector { kube : mgr . GetClient ( ) , usage : resource . NewProviderConfigUsageTracker ( mgr . GetClient ( ) , & apisv1alpha1 . ProviderConfigUsage { } ) , } ) , managed . WithLogger ( l . WithValues ( " " , name ) ) , managed . WithRecorder ( event . NewAPIRecorder ( mgr . GetEventRecorderFor ( name ) ) ) ) return ctrl . NewControllerManagedBy ( mgr ) . Named ( name ) . WithOptions ( o ) . For ( & v1alpha1 . ZeebeCluster { } ) . Complete ( r ) }
Setup adds a controller that reconciles MyType managed resources.
Setup adds a controller that reconciles MyType managed resources .