Skip to content

Commit

Permalink
avoid rate limiting
Browse files Browse the repository at this point in the history
  • Loading branch information
sauterp committed Feb 22, 2024
1 parent 038a7b4 commit baa67f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions internal/integ/cluster/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"log/slog"
"os"
"time"

"github.com/exoscale/exoscale/csi-driver/internal/integ/flags"

Expand Down Expand Up @@ -161,9 +160,5 @@ func Setup() error {
}
}

// give the CSI some time to become ready
// TODO find a more appropriate way to do this.
time.Sleep(30 * time.Second)

return nil
}
5 changes: 5 additions & 0 deletions internal/integ/k8s/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ func CreateClients(kubeconfig []byte) (*K8S, error) {
return nil, err
}

// we frequently encounter rate limiting from the test cluster
// to avoid this we set low values.
config.QPS = 1
config.Burst = 2

discoveryClient, err := discovery.NewDiscoveryClientForConfig(config)
if err != nil {
return nil, err
Expand Down

0 comments on commit baa67f3

Please sign in to comment.