From e97103494f5f82d9715df7018e58fa73f28a2559 Mon Sep 17 00:00:00 2001 From: Matthias Bertschy Date: Thu, 21 Sep 2023 16:32:28 +0200 Subject: [PATCH] disable rate limiting for storage client Signed-off-by: Matthias Bertschy --- httphandler/go.mod | 2 +- httphandler/go.sum | 4 ++-- httphandler/storage/apiserver.go | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/httphandler/go.mod b/httphandler/go.mod index 022dad66..00c37261 100644 --- a/httphandler/go.mod +++ b/httphandler/go.mod @@ -16,7 +16,7 @@ require ( github.com/kubescape/k8s-interface v0.0.144 github.com/kubescape/kubescape/v2 v2.0.0-00010101000000-000000000000 github.com/kubescape/opa-utils v0.0.268 - github.com/kubescape/storage v0.0.16 + github.com/kubescape/storage v0.0.20 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.38.0 go.opentelemetry.io/otel v1.16.0 diff --git a/httphandler/go.sum b/httphandler/go.sum index 2e57ad7f..9f35dd7f 100644 --- a/httphandler/go.sum +++ b/httphandler/go.sum @@ -1304,8 +1304,8 @@ github.com/kubescape/rbac-utils v0.0.21-0.20230806101615-07e36f555520 h1:SqlwF8G github.com/kubescape/rbac-utils v0.0.21-0.20230806101615-07e36f555520/go.mod h1:wuxMUSDzGUyWd25IJfBzEJ/Udmw2Vy7npj+MV3u3GrU= github.com/kubescape/regolibrary v1.0.291-rc.0 h1:DztPS3NSKfiltO1wZvxRjuu5c99c6+dEgfTs6DcsVa8= github.com/kubescape/regolibrary v1.0.291-rc.0/go.mod h1:2j47Snl7jbbR0GenKlnbIQ+dk1J3XpX3x5T/SWY3OJ0= -github.com/kubescape/storage v0.0.16 h1:4BR4h8oSE+Q9w5O7ZwzJeGO8a4j2p/QAfx4nFEKO0dI= -github.com/kubescape/storage v0.0.16/go.mod h1:LDJDA+AxRosIer/1Ma/HSf2SvXgxCH8bYQ9eejAAv8s= +github.com/kubescape/storage v0.0.20 h1:m78XUf08QZRTw3pIRkGi54AtH4ugRYisG6xfxC1zZnQ= +github.com/kubescape/storage v0.0.20/go.mod h1:rP6g1ukp4zlytnBcZw+fJHu0j6woOiQ/KfTZfrdM8kw= github.com/kubescape/tablewriter v0.0.6-0.20230907094812-c8c737a432a6 h1:lUPN6vNOahuAs9Vd5IhoOndYja0zdF90VfcuB5XXkzQ= github.com/kubescape/tablewriter v0.0.6-0.20230907094812-c8c737a432a6/go.mod h1:g5pGEwPUwL4fTRUODq3fWP41Kn9IoBQrZni/kA1gxq4= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= diff --git a/httphandler/storage/apiserver.go b/httphandler/storage/apiserver.go index 034057d6..d2b198fc 100644 --- a/httphandler/storage/apiserver.go +++ b/httphandler/storage/apiserver.go @@ -55,6 +55,9 @@ func GetStorage() *APIServerStore { // NewAPIServerStorage initializes the APIServerStore struct func NewAPIServerStorage(namespace string, config *rest.Config) (*APIServerStore, error) { + // disable rate limiting + config.QPS = 0 + config.RateLimiter = nil clientset, err := versioned.NewForConfig(config) if err != nil { return nil, err