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 <[email protected]>
  • Loading branch information
humblec committed May 22, 2020
1 parent 0123a6a commit f8a0c27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
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,9 @@ 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.
* `--csiTimeout <duration>`: ( Deprecated, use --timeout instead) 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
8 changes: 4 additions & 4 deletions cmd/csi-resizer/main.go
Original file line number Diff line number Diff line change
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,8 @@ 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.")
csiTimeout = flag.Duration("csiTimeout", 15*time.Second, "( Deprecated use --timeout instead) 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 +76,7 @@ func main() {

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

0 comments on commit f8a0c27

Please sign in to comment.