From 946289830b57b6fbb822d1517a2a63666d61897a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Golicz?= Date: Mon, 25 Nov 2024 15:21:36 +0100 Subject: [PATCH] Increase number of workers for GardenerCluster controller to 25 --- internal/controller/kubeconfig/gardener_cluster_controller.go | 3 +++ internal/controller/runtime/runtime_controller.go | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) 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