From f6a2e9cd326885c5a7a0628ff66aae15b2473a33 Mon Sep 17 00:00:00 2001 From: Alexej Disterhoft Date: Wed, 30 Oct 2024 08:29:53 +0100 Subject: [PATCH] fix(namespaces): increase QPS and burst rate limits --- pkg/subcommands/ns/ns.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/subcommands/ns/ns.go b/pkg/subcommands/ns/ns.go index b23c73fe..5b74c79e 100644 --- a/pkg/subcommands/ns/ns.go +++ b/pkg/subcommands/ns/ns.go @@ -315,6 +315,10 @@ func getClient(kubeconfigPath string) (client.Client, error) { return nil, fmt.Errorf("unable to create rest config: %v", err) } + // increase QPS and Burst to avoid rate limiting, these values are the same as kubectl uses + restConfig.QPS = 50.0 + restConfig.Burst = 300 + client, err := client.New(restConfig, client.Options{ Scheme: scheme, })