Skip to content

Commit 17ec858

Browse files
committed
Add --max-concurrent-reconciles flag
1 parent fa54911 commit 17ec858

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cmd/manager/main.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ func main() {
9393
"The duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.",
9494
)
9595

96+
maxConcurrentReconciles := flag.Int(
97+
"max-concurrent-reconciles",
98+
1,
99+
"Maximum number of concurrent reconciles per controller instance.",
100+
)
101+
96102
klog.InitFlags(nil)
97103
flag.Set("logtostderr", "true")
98104
flag.Parse()
@@ -173,7 +179,9 @@ func main() {
173179
klog.Fatal(err)
174180
}
175181

176-
if err := machine.AddWithActuator(mgr, machineActuator); err != nil {
182+
if err := machine.AddWithActuatorOpts(mgr, machineActuator, controller.Options{
183+
MaxConcurrentReconciles: *maxConcurrentReconciles,
184+
}); err != nil {
177185
klog.Fatal(err)
178186
}
179187

0 commit comments

Comments
 (0)