File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ import (
2626 "k8s.io/klog/v2"
2727)
2828
29+ const (
30+ controllerQueuePerItemRetryMaxDelay = 20 * time .Second
31+ )
32+
2933// QueueAndWorkers is generic code for a typical controller's workqueue and worker goroutines
3034// that pull from that queue.
3135type QueueAndWorkers [Item comparable ] struct {
@@ -62,7 +66,10 @@ func newQueueAndWorkers[Item comparable](
6266 ans := QueueAndWorkers [Item ]{
6367 ControllerName : controllerName ,
6468 Queue : workqueue .NewTypedRateLimitingQueueWithConfig (
65- workqueue .DefaultTypedControllerRateLimiter [Item ](),
69+ workqueue .NewTypedWithMaxWaitRateLimiter (
70+ workqueue .DefaultTypedControllerRateLimiter [Item ](),
71+ controllerQueuePerItemRetryMaxDelay ,
72+ ),
6673 workqueue.TypedRateLimitingQueueConfig [Item ]{
6774 Name : controllerName ,
6875 }),
You can’t perform that action at this time.
0 commit comments