Skip to content

Commit

Permalink
Replace csiTimeout to timeout param for resizer
Browse files Browse the repository at this point in the history
At present the resizer has CSI call timeout value
taken as arg in form of `--csiTimeout` , however all
other sidecars have this parameter as `--timeout`.
This patch replaces `csiTimeout` to `timeout` value

NOTE: This is a breaking change, so we need a new release

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
  • Loading branch information
humblec committed May 21, 2020
1 parent 0123a6a commit 250910b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -14,9 +14,9 @@ control-plane CSI RPC call or via node CSI RPC call or both as a two step proces

This information reflects the head of this branch.

| Compatible with CSI Version | Container Image | [Recommended K8s Version](https://kubernetes-csi.github.io/docs/kubernetes-compatibility.html#recommended-version) |
| ------------------------------------------------------------------------------------------ | -------------------------------| --------------- |
| [CSI Spec v1.2.0](https://github.com/container-storage-interface/spec/releases/tag/v1.2.0) | quay.io/k8scsi/csi-resizer | 1.16 |
| Compatible with CSI Version | Container Image | [Recommended K8s Version](https://kubernetes-csi.github.io/docs/kubernetes-compatibility.html#recommended-version) |
| ------------------------------------------------------------------------------------------ | -------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [CSI Spec v1.2.0](https://github.com/container-storage-interface/spec/releases/tag/v1.2.0) | quay.io/k8scsi/csi-resizer | 1.16 |



Expand Down Expand Up @@ -46,7 +46,7 @@ Note that the external-resizer does not scale with more replicas. Only one exter

* `--leader-election-namespace`: Namespace where the leader election resource lives. Defaults to the pod namespace if not set.

* `--csiTimeout <duration>`: Timeout of all calls to CSI driver. It should be set to value that accommodates majority of `ControllerExpandVolume` calls. 15 seconds is used by default.
* `--timeout <duration>`: Timeout of all calls to CSI driver. It should be set to value that accommodates majority of `ControllerExpandVolume` calls. 15 seconds is used by default.

* `--retry-interval-start`: The starting value of the exponential backoff for failures. 1 second is used by default.

Expand Down
7 changes: 3 additions & 4 deletions cmd/csi-resizer/main.go
Expand Up @@ -20,17 +20,16 @@ import (
"context"
"flag"
"fmt"
"k8s.io/client-go/util/workqueue"
"os"
"time"

"github.com/kubernetes-csi/csi-lib-utils/leaderelection"
"github.com/kubernetes-csi/external-resizer/pkg/controller"
"github.com/kubernetes-csi/external-resizer/pkg/resizer"
"github.com/kubernetes-csi/external-resizer/pkg/util"

"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/informers"
"k8s.io/client-go/util/workqueue"
"k8s.io/klog"
)

Expand All @@ -41,7 +40,7 @@ var (
workers = flag.Int("workers", 10, "Concurrency to process multiple resize requests")

csiAddress = flag.String("csi-address", "/run/csi/socket", "Address of the CSI driver socket.")
csiTimeout = flag.Duration("csiTimeout", 15*time.Second, "Timeout for waiting for CSI driver socket.")
timeout = flag.Duration("timeout", 15*time.Second, "Timeout for waiting for CSI driver socket.")
showVersion = flag.Bool("version", false, "Show version")

retryIntervalStart = flag.Duration("retry-interval-start", time.Second, "Initial retry interval of failed volume resize. It exponentially increases with each failure, up to retry-interval-max.")
Expand Down Expand Up @@ -76,7 +75,7 @@ func main() {

csiResizer, err := resizer.NewResizer(
*csiAddress,
*csiTimeout,
*timeout,
kubeClient,
informerFactory,
*metricsAddress,
Expand Down

0 comments on commit 250910b

Please sign in to comment.