Skip to content

Commit 1d11a6b

Browse files
Set manager concurrency by default to 15 across all controllers
Signed-off-by: Danil-Grigorev <[email protected]>
1 parent 5538771 commit 1d11a6b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

main.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import (
3939
ctrl "sigs.k8s.io/controller-runtime"
4040
"sigs.k8s.io/controller-runtime/pkg/cache"
4141
"sigs.k8s.io/controller-runtime/pkg/client"
42+
"sigs.k8s.io/controller-runtime/pkg/config"
4243
"sigs.k8s.io/controller-runtime/pkg/controller"
4344
"sigs.k8s.io/controller-runtime/pkg/healthz"
4445
"sigs.k8s.io/controller-runtime/pkg/metrics/server"
@@ -70,6 +71,7 @@ var (
7071
syncPeriod time.Duration
7172
healthAddr string
7273
concurrencyNumber int
74+
managerConcurrency int
7375
rancherKubeconfig string
7476
insecureSkipVerify bool
7577
)
@@ -118,6 +120,9 @@ func initFlags(fs *pflag.FlagSet) {
118120
fs.IntVar(&concurrencyNumber, "concurrency", 1,
119121
"Number of resources to process simultaneously")
120122

123+
fs.IntVar(&managerConcurrency, "manager-concurrency", 15,
124+
"Number of concurrent reconciles to process simultaneously across all controllers")
125+
121126
fs.StringVar(&rancherKubeconfig, "rancher-kubeconfig", "",
122127
"Path to the Rancher kubeconfig file. Only required if running out-of-cluster.")
123128

@@ -158,6 +163,9 @@ func main() {
158163
},
159164
},
160165
},
166+
Controller: config.Controller{
167+
MaxConcurrentReconciles: concurrencyNumber,
168+
},
161169
Cache: cache.Options{
162170
SyncPeriod: &syncPeriod,
163171
},

0 commit comments

Comments
 (0)