func()

in internal/controller/cache_controller.go [113:128]


func (r *CacheReconciler) SetupWithManager(mgr ctrl.Manager) error { // +gocover:ignore:block init controller
	if err := mgr.GetFieldIndexer().IndexField(context.Background(), &v1alpha1.Operation{}, v1alpha1.CacheOwnerKey, cacheOperationIndexerFunc); err != nil { // +gocover:ignore:block init controller
		return err
	}
	// +gocover:ignore:block init controller
	r.recorder = mgr.GetEventRecorderFor("Cache")

	return ctrl.NewControllerManagedBy(mgr).
		For(&v1alpha1.Cache{}).
		Owns(&v1alpha1.Operation{}).
		WithOptions(controller.Options{
			MaxConcurrentReconciles: 50,
		}).
		Named("cache").
		Complete(r)
}