Allow tuning Common-controller Ratelimiter with retryIntervalStart & retryIntervalMax
This patch adds two new parameters `retryIntervalStart & retryIntervalMax` which can be configured to adjust the ratelimiters of snapshotqueue and contentqueue in the controller. Signed-off-by: Humble Chirammal <hchiramm@redhat.com> ```release-note `retry-interval-start` and `retry-interval-max` arguments are added to common-controller which controls retry interval of failed volume snapshot creation and deletion. These values set the ratelimiter for snapshot and content queues. ``` Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
@@ -76,6 +76,8 @@ func NewCSISnapshotCommonController(
|
||||
pvcInformer coreinformers.PersistentVolumeClaimInformer,
|
||||
metricsManager metrics.MetricsManager,
|
||||
resyncPeriod time.Duration,
|
||||
snapshotRateLimiter workqueue.RateLimiter,
|
||||
contentRateLimiter workqueue.RateLimiter,
|
||||
) *csiSnapshotCommonController {
|
||||
broadcaster := record.NewBroadcaster()
|
||||
broadcaster.StartLogging(klog.Infof)
|
||||
@@ -90,8 +92,8 @@ func NewCSISnapshotCommonController(
|
||||
resyncPeriod: resyncPeriod,
|
||||
snapshotStore: cache.NewStore(cache.DeletionHandlingMetaNamespaceKeyFunc),
|
||||
contentStore: cache.NewStore(cache.DeletionHandlingMetaNamespaceKeyFunc),
|
||||
snapshotQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "snapshot-controller-snapshot"),
|
||||
contentQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "snapshot-controller-content"),
|
||||
snapshotQueue: workqueue.NewNamedRateLimitingQueue(snapshotRateLimiter, "snapshot-controller-snapshot"),
|
||||
contentQueue: workqueue.NewNamedRateLimitingQueue(contentRateLimiter, "snapshot-controller-content"),
|
||||
metricsManager: metricsManager,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user