feature: add QPS Burst flags

This commit is contained in:
googs1025
2024-10-27 21:58:45 +08:00
parent 53e0152f64
commit 17dcc94418
2 changed files with 8 additions and 1 deletions
@@ -74,7 +74,8 @@ func NewClientOrDie(npdo *options.NodeProblemDetectorOptions) Client {
}
cfg.UserAgent = fmt.Sprintf("%s/%s", filepath.Base(os.Args[0]), version.Version())
// TODO(random-liu): Set QPS Limit
cfg.QPS = float32(npdo.QPS)
cfg.Burst = npdo.Burst
c.client = clientset.NewForConfigOrDie(cfg).CoreV1()
c.nodeName = npdo.NodeName
c.eventNamespace = npdo.EventNamespace