diff --git a/internal/controller/kubeconfig/gardener_cluster_controller.go b/internal/controller/kubeconfig/gardener_cluster_controller.go index c532e203..67aa9f5b 100644 --- a/internal/controller/kubeconfig/gardener_cluster_controller.go +++ b/internal/controller/kubeconfig/gardener_cluster_controller.go @@ -34,6 +34,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/client" + pkgctrl "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/predicate" ) @@ -43,6 +44,7 @@ const ( clusterCRNameLabel = "operator.kyma-project.io/cluster-name" rotationPeriodRatio = 0.95 + numberOfWorkers = 25 ) // GardenerClusterController reconciles a GardenerCluster object @@ -436,5 +438,6 @@ func (controller *GardenerClusterController) SetupWithManager(mgr ctrl.Manager) predicate.AnnotationChangedPredicate{}, predicate.GenerationChangedPredicate{}), )). + WithOptions(pkgctrl.Options{MaxConcurrentReconciles: numberOfWorkers}). Complete(controller) } diff --git a/internal/controller/runtime/runtime_controller.go b/internal/controller/runtime/runtime_controller.go index 03829ed3..f621ae40 100644 --- a/internal/controller/runtime/runtime_controller.go +++ b/internal/controller/runtime/runtime_controller.go @@ -31,9 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/predicate" ) -const ( - numberOfWorkers = 25 -) +const numberOfWorkers = 25 // RuntimeReconciler reconciles a Runtime object // nolint:revive