Merge pull request #1399 from kubescape/noratelimit

disable rate limiting for storage client
This commit is contained in:
Matthias Bertschy
2023-09-27 17:07:45 +02:00
committed by GitHub
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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=
+3
View File
@@ -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