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:
Humble Chirammal
2021-06-11 20:56:51 +05:30
parent af117aad81
commit 206fecb9f1
5 changed files with 19 additions and 6 deletions

View File

@@ -19,6 +19,7 @@ package common_controller
import (
"errors"
"fmt"
"k8s.io/client-go/util/workqueue"
"reflect"
sysruntime "runtime"
"strconv"
@@ -749,6 +750,8 @@ func newTestController(kubeClient kubernetes.Interface, clientset clientset.Inte
coreFactory.Core().V1().PersistentVolumeClaims(),
metricsManager,
60*time.Second,
workqueue.NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1*time.Minute),
workqueue.NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1*time.Minute),
)
ctrl.eventRecorder = record.NewFakeRecorder(1000)