Add ability to customize VolumeSnapshotContent workqueue
Two new timeout values ( retryIntervalStart & retryIntervalMax ) have been added to set the ratelimiter for volumesnapshotcontent queue. Fix# https://github.com/kubernetes-csi/external-snapshotter/issues/463 Signed-off-by: Humble Chirammal <hchiramm@redhat.com> ```release-note `retry-interval-start` and `retry-interval-max` arguments are added to csi-snapshotter sidecar which controls retry interval of failed volume snapshot creation and deletion. These values set the ratelimiter for volumesnapshotcontent queue. ``` Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
@@ -46,6 +46,7 @@ import (
|
||||
core "k8s.io/client-go/testing"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/tools/record"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
klog "k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
@@ -522,6 +523,7 @@ func newTestController(kubeClient kubernetes.Interface, clientset clientset.Inte
|
||||
"snapshot",
|
||||
-1,
|
||||
true,
|
||||
workqueue.NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1*time.Minute),
|
||||
)
|
||||
|
||||
ctrl.eventRecorder = record.NewFakeRecorder(1000)
|
||||
|
@@ -72,6 +72,7 @@ func NewCSISnapshotSideCarController(
|
||||
snapshotNamePrefix string,
|
||||
snapshotNameUUIDLength int,
|
||||
extraCreateMetadata bool,
|
||||
contentRateLimiter workqueue.RateLimiter,
|
||||
) *csiSnapshotSideCarController {
|
||||
broadcaster := record.NewBroadcaster()
|
||||
broadcaster.StartLogging(klog.Infof)
|
||||
@@ -87,7 +88,7 @@ func NewCSISnapshotSideCarController(
|
||||
handler: NewCSIHandler(snapshotter, timeout, snapshotNamePrefix, snapshotNameUUIDLength),
|
||||
resyncPeriod: resyncPeriod,
|
||||
contentStore: cache.NewStore(cache.DeletionHandlingMetaNamespaceKeyFunc),
|
||||
contentQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "csi-snapshotter-content"),
|
||||
contentQueue: workqueue.NewNamedRateLimitingQueue(contentRateLimiter, "csi-snapshotter-content"),
|
||||
extraCreateMetadata: extraCreateMetadata,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user