From cd1645ff2c195fbb353cfabcbc36e3c3b883c3c5 Mon Sep 17 00:00:00 2001 From: Alvaro Aleman Date: Fri, 27 Sep 2024 10:34:15 -0400 Subject: [PATCH] RestCfg: Add godocs on how to disable ratelimiting I frequently find myself in the situation of not remembering which of QPS/Burst I have to set. This change adds a small go doc to clarify that. --- staging/src/k8s.io/client-go/rest/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/staging/src/k8s.io/client-go/rest/config.go b/staging/src/k8s.io/client-go/rest/config.go index f8ff7e928cf..998a2f8b998 100644 --- a/staging/src/k8s.io/client-go/rest/config.go +++ b/staging/src/k8s.io/client-go/rest/config.go @@ -113,6 +113,9 @@ type Config struct { // QPS indicates the maximum QPS to the master from this client. // If it's zero, the created RESTClient will use DefaultQPS: 5 + // + // Setting this to a negative value will disable client-side ratelimiting + // unless `Ratelimiter` is also set. QPS float32 // Maximum burst for throttle.