mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 06:15:45 +00:00
sarapprover: increase base delay of per item rate limit
from 5 miliseconds to 1 second
This commit is contained in:
parent
302fe7c0c8
commit
0e0f8346e7
@ -36,6 +36,7 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/controller"
|
"k8s.io/kubernetes/pkg/controller"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
|
"github.com/juju/ratelimit"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CertificateController struct {
|
type CertificateController struct {
|
||||||
@ -61,8 +62,12 @@ func NewCertificateController(
|
|||||||
|
|
||||||
cc := &CertificateController{
|
cc := &CertificateController{
|
||||||
kubeClient: kubeClient,
|
kubeClient: kubeClient,
|
||||||
queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "certificate"),
|
queue: workqueue.NewNamedRateLimitingQueue(workqueue.NewMaxOfRateLimiter(
|
||||||
handler: handler,
|
workqueue.NewItemExponentialFailureRateLimiter(200*time.Millisecond, 1000*time.Second),
|
||||||
|
// 10 qps, 100 bucket size. This is only for retry speed and its only the overall factor (not per item)
|
||||||
|
&workqueue.BucketRateLimiter{Bucket: ratelimit.NewBucketWithRate(float64(10), int64(100))},
|
||||||
|
), "certificate"),
|
||||||
|
handler: handler,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manage the addition/update of certificate requests
|
// Manage the addition/update of certificate requests
|
||||||
|
Loading…
Reference in New Issue
Block a user