func()

in internal/controller/operation_controller.go [104:118]


func (r *OperationReconciler) SetupWithManager(mgr ctrl.Manager) error {
	if err := mgr.GetFieldIndexer().IndexField(context.Background(),
		&v1alpha1.AppDeployment{}, v1alpha1.OperationOwnerKey, operationIndexerFunc); err != nil {
		return err
	}
	r.recorder = mgr.GetEventRecorderFor("Operation")
	return ctrl.NewControllerManagedBy(mgr).
		For(&v1alpha1.Operation{}).
		Owns(&v1alpha1.AppDeployment{}).
		WithOptions(controller.Options{
			MaxConcurrentReconciles: 100,
		}).
		Named("operation").
		Complete(r)
}