@@ -105,6 +105,9 @@ func main() {
105
105
opts = actionsgithubcom .OptionsWithDefault ()
106
106
107
107
commonRunnerLabels commaSeparatedStringSlice
108
+
109
+ k8sClientRateLimiterQPS int
110
+ k8sClientRateLimiterBurst int
108
111
)
109
112
var c github.Config
110
113
err = envconfig .Process ("github" , & c )
@@ -148,6 +151,8 @@ func main() {
148
151
flag .BoolVar (& autoScalingRunnerSetOnly , "auto-scaling-runner-set-only" , false , "Make controller only reconcile AutoRunnerScaleSet object." )
149
152
flag .StringVar (& updateStrategy , "update-strategy" , "immediate" , `Resources reconciliation strategy on upgrade with running/pending jobs. Valid values are: "immediate", "eventual". Defaults to "immediate".` )
150
153
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." )
151
156
flag .Parse ()
152
157
153
158
runnerPodDefaults .RunnerImagePullSecrets = runnerImagePullSecrets
@@ -219,7 +224,11 @@ func main() {
219
224
})
220
225
}
221
226
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 {
223
232
Scheme : scheme ,
224
233
Metrics : metricsserver.Options {
225
234
BindAddress : metricsAddr ,
0 commit comments