@@ -57,6 +57,7 @@ func main() {
57
57
var developmentMode bool
58
58
var probeAddr string
59
59
var syncPeriod time.Duration
60
+ var queriesPerSecond float32
60
61
flag .StringVar (& metricsAddr , "metrics-bind-address" , ":8080" , "The address the metric endpoint binds to." )
61
62
flag .StringVar (& probeAddr , "health-probe-bind-address" , ":8081" , "The address the probe endpoint binds to." )
62
63
flag .BoolVar (& enableLeaderElection , "leader-elect" , false ,
@@ -65,6 +66,7 @@ func main() {
65
66
flag .BoolVar (& developmentMode , "development-mode" , false , "Enable development mode" )
66
67
flag .DurationVar (& syncPeriod , "sync-period" , 60 * time .Second , "Sync period" )
67
68
flag .Int ("max-concurrent-reconciles" , 1 , "Maximum number of concurrent reconciles for controllers." )
69
+ flag .Float32Var (& queriesPerSecond , "queries-per-second" , 300.0 , "Maximum number of queries per second made by the reconciler client." )
68
70
viper .BindPFlag ("max-concurrent-reconciles" , flag .Lookup ("max-concurrent-reconciles" ))
69
71
flag .Parse ()
70
72
@@ -88,7 +90,9 @@ func main() {
88
90
os .Exit (1 )
89
91
}
90
92
91
- reconciler := controllers .NewReconciler (mgr )
93
+ reconciler := controllers .NewReconciler (mgr , controllers.ReconcilerOptions {
94
+ QueriesPerSecond : queriesPerSecond ,
95
+ })
92
96
if err = reconciler .SetupWithManager (mgr ); err != nil {
93
97
setupLog .Error (err , "unable to create controller" , "controller" , "Composable" )
94
98
os .Exit (1 )
0 commit comments