Skip to content

Commit ae8826a

Browse files
authored
Merge pull request #82 from humblec/new
Replace `csiTimeout` to `timeout` param for resizer
2 parents d017b1f + 77f4ef8 commit ae8826a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Note that the external-resizer does not scale with more replicas. Only one exter
4444

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

47-
* `--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.
47+
* `--timeout <duration>`: Timeout of all calls to CSI driver. It should be set to value that accommodates majority of `ControllerExpandVolume` calls. 10 seconds is used by default.
4848

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

cmd/csi-resizer/main.go

+7-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ import (
2020
"context"
2121
"flag"
2222
"fmt"
23+
"os"
24+
"time"
25+
2326
"k8s.io/client-go/kubernetes"
2427
"k8s.io/client-go/rest"
2528
"k8s.io/client-go/tools/clientcmd"
26-
"os"
27-
"time"
2829

2930
"k8s.io/client-go/util/workqueue"
3031

@@ -44,8 +45,9 @@ var (
4445
resyncPeriod = flag.Duration("resync-period", time.Minute*10, "Resync period for cache")
4546
workers = flag.Int("workers", 10, "Concurrency to process multiple resize requests")
4647

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

5153
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.")
@@ -99,7 +101,7 @@ func main() {
99101

100102
csiResizer, err := resizer.NewResizer(
101103
*csiAddress,
102-
*csiTimeout,
104+
*timeout,
103105
kubeClient,
104106
informerFactory,
105107
*metricsAddress,

0 commit comments

Comments
 (0)