@@ -105,6 +105,9 @@ func main() {
105105 opts = actionsgithubcom .OptionsWithDefault ()
106106
107107 commonRunnerLabels commaSeparatedStringSlice
108+
109+ k8sClientRateLimiterQPS int
110+ k8sClientRateLimiterBurst int
108111 )
109112 var c github.Config
110113 err = envconfig .Process ("github" , & c )
@@ -148,6 +151,8 @@ func main() {
148151 flag .BoolVar (& autoScalingRunnerSetOnly , "auto-scaling-runner-set-only" , false , "Make controller only reconcile AutoRunnerScaleSet object." )
149152 flag .StringVar (& updateStrategy , "update-strategy" , "immediate" , `Resources reconciliation strategy on upgrade with running/pending jobs. Valid values are: "immediate", "eventual". Defaults to "immediate".` )
150153 flag .Var (& autoScalerImagePullSecrets , "auto-scaler-image-pull-secrets" , "The default image-pull secret name for auto-scaler listener container." )
154+ flag .IntVar (& k8sClientRateLimiterQPS , "k8s-client-rate-limiter-qps" , 20 , "The QPS value of the K8s client rate limiter." )
155+ flag .IntVar (& k8sClientRateLimiterBurst , "k8s-client-rate-limiter-burst" , 30 , "The burst value of the K8s client rate limiter." )
151156 flag .Parse ()
152157
153158 runnerPodDefaults .RunnerImagePullSecrets = runnerImagePullSecrets
@@ -219,7 +224,11 @@ func main() {
219224 })
220225 }
221226
222- mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), ctrl.Options {
227+ cfg := ctrl .GetConfigOrDie ()
228+ cfg .QPS = float32 (k8sClientRateLimiterQPS )
229+ cfg .Burst = k8sClientRateLimiterBurst
230+
231+ mgr , err := ctrl .NewManager (cfg , ctrl.Options {
223232 Scheme : scheme ,
224233 Metrics : metricsserver.Options {
225234 BindAddress : metricsAddr ,
0 commit comments