Skip to content

Commit 592e5c4

Browse files
authored
Merge pull request #2288 from sbueringer/pr-introduce-cct-flag
🌱 Introduce --clustercachetracker-concurrency flag
2 parents 8c8caf5 + f44a004 commit 592e5c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ var (
7474
webhookOpts webhook.Options
7575
watchNamespace string
7676

77+
clusterCacheTrackerConcurrency int
7778
vSphereClusterConcurrency int
7879
vSphereMachineConcurrency int
7980
providerServiceAccountConcurrency int
@@ -103,6 +104,9 @@ func InitFlags(fs *pflag.FlagSet) {
103104
defaultLeaderElectionID,
104105
"Name of the config map to use as the locking resource when configuring leader election.")
105106

107+
fs.IntVar(&clusterCacheTrackerConcurrency, "clustercachetracker-concurrency", 10,
108+
"Number of clusters to process simultaneously")
109+
106110
fs.IntVar(&vSphereClusterConcurrency, "vspherecluster-concurrency", 10,
107111
"Number of vSphere clusters to process simultaneously")
108112

@@ -447,7 +451,7 @@ func setupRemoteClusterCacheTracker(ctx *context.ControllerManagerContext, mgr c
447451
Client: mgr.GetClient(),
448452
Tracker: tracker,
449453
WatchFilterValue: managerOpts.WatchFilterValue,
450-
}).SetupWithManager(ctx, mgr, concurrency(10)); err != nil {
454+
}).SetupWithManager(ctx, mgr, concurrency(clusterCacheTrackerConcurrency)); err != nil {
451455
return nil, perrors.Wrapf(err, "unable to create ClusterCacheReconciler controller")
452456
}
453457

0 commit comments

Comments
 (0)