@@ -40,8 +40,10 @@ import (
40
40
ctrl "sigs.k8s.io/controller-runtime"
41
41
"sigs.k8s.io/controller-runtime/pkg/cache"
42
42
"sigs.k8s.io/controller-runtime/pkg/client"
43
+ "sigs.k8s.io/controller-runtime/pkg/config"
43
44
"sigs.k8s.io/controller-runtime/pkg/controller"
44
45
"sigs.k8s.io/controller-runtime/pkg/healthz"
46
+
45
47
ctrlwebhook "sigs.k8s.io/controller-runtime/pkg/webhook"
46
48
47
49
operatorv1 "sigs.k8s.io/cluster-api-operator/api/v1alpha2"
63
65
profilerAddress string
64
66
enableContentionProfiling bool
65
67
concurrencyNumber int
68
+ managerConcurrency int
66
69
syncPeriod time.Duration
67
70
webhookPort int
68
71
webhookCertDir string
@@ -113,6 +116,9 @@ func InitFlags(fs *pflag.FlagSet) {
113
116
fs .IntVar (& concurrencyNumber , "concurrency" , 1 ,
114
117
"Number of core resources to process simultaneously" )
115
118
119
+ fs .IntVar (& managerConcurrency , "manager-concurrency" , 10 ,
120
+ "Number of concurrent reconciles to process simultaneously across all controllers" )
121
+
116
122
fs .DurationVar (& syncPeriod , "sync-period" , 10 * time .Minute ,
117
123
"The minimum interval at which watched resources are reconciled (e.g. 15m)" )
118
124
@@ -174,6 +180,9 @@ func main() {
174
180
},
175
181
},
176
182
},
183
+ Controller : config.Controller {
184
+ MaxConcurrentReconciles : managerConcurrency ,
185
+ },
177
186
WebhookServer : ctrlwebhook .NewServer (
178
187
ctrlwebhook.Options {
179
188
Port : webhookPort ,
0 commit comments