Skip to content

Commit

Permalink
updated to burst to uint
Browse files Browse the repository at this point in the history
  • Loading branch information
jaireddjawed committed Feb 20, 2025
1 parent f60a869 commit 51380e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/options/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type VSOEnvOptions struct {
KubeClientQPS float64 `split_words:"true"`

// KubeClientBurst is the VSO_KUBE_CLIENT_BURST environment variable option
KubeClientBurst *int `split_words:"true"`
KubeClientBurst *uint `split_words:"true"`
}

// Parse environment variable options, prefixed with "VSO_"
Expand Down
2 changes: 1 addition & 1 deletion internal/options/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestParse(t *testing.T) {
GlobalVaultAuthOptions: []string{"vOpt1", "vOpt2"},
ClientCacheNumLocks: ptr.To(10),
KubeClientQPS: 100,
KubeClientBurst: ptr.To(1000),
KubeClientBurst: ptr.To(uint(1000)),
},
},
}
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func main() {
var backoffMultiplier float64
var backoffMaxElapsedTime time.Duration
var kubeClientQPS float64
var kubeClientBurst int
var kubeClientBurst uint

// command-line args and flags
flag.BoolVar(&printVersion, "version", false, "Print the operator version information")
Expand Down Expand Up @@ -222,7 +222,7 @@ func main() {
"Maximum queries per second to limit requests sent to the API server and prevent overload. "+
"When the value is 0, the kubernetes client's default is used. "+
"Also set from environment variable VSO_KUBE_CLIENT_QPS.")
flag.IntVar(&kubeClientBurst, "kube-client-burst", 0,
flag.UintVar(&kubeClientBurst, "kube-client-burst", 0,
"Maximum burst for throttling requests to the Kubernetes API. "+
"When the value is 0, the kubernetes client's default is used. "+
"Also set from environment variable VSO_KUBE_CLIENT_BURST.")
Expand Down Expand Up @@ -363,7 +363,7 @@ func main() {
config.QPS = float32(kubeClientQPS)
}
if kubeClientBurst != 0 {
config.Burst = kubeClientBurst
config.Burst = int(kubeClientBurst)
}

defaultClient, err := client.NewWithWatch(config, client.Options{
Expand Down

0 comments on commit 51380e6

Please sign in to comment.