|
42 | 42 | httpEndpoint = flag.String("http-endpoint", "", "The TCP network address where the prometheus metrics endpoint will listen (example: `:8080`). The default is empty string, which means metrics endpoint is disabled.")
|
43 | 43 | metricsPath = flag.String("metrics-path", "/metrics", "The HTTP path where prometheus metrics will be exposed. Default is `/metrics`.")
|
44 | 44 |
|
45 |
| - extraVolumeLabelsStr = flag.String("extra-labels", "", "Extra labels to attach to each PD created. It is a comma separated list of key value pairs like '<key1>=<value1>,<key2>=<value2>'. See https://cloud.google.com/compute/docs/labeling-resources for details") |
| 45 | + errorBackoffInitialDurationMs = flag.Int("backoff-initial-duration-ms", 200, "The amount of ms for the initial duration of the backoff condition for controller publish/unpublish CSI operations. Default is 200.") |
| 46 | + errorBackoffMaxDurationMs = flag.Int("backoff-max-duration-ms", 300000, "The amount of ms for the max duration of the backoff condition for controller publish/unpublish CSI operations. Default is 300000 (5m).") |
| 47 | + extraVolumeLabelsStr = flag.String("extra-labels", "", "Extra labels to attach to each PD created. It is a comma separated list of key value pairs like '<key1>=<value1>,<key2>=<value2>'. See https://cloud.google.com/compute/docs/labeling-resources for details") |
46 | 48 |
|
47 | 49 | attachDiskBackoffDuration = flag.Duration("attach-disk-backoff-duration", 5*time.Second, "Duration for attachDisk backoff")
|
48 | 50 | attachDiskBackoffFactor = flag.Float64("attach-disk-backoff-factor", 0.0, "Factor for attachDisk backoff")
|
@@ -122,7 +124,9 @@ func handle() {
|
122 | 124 | if err != nil {
|
123 | 125 | klog.Fatalf("Failed to get cloud provider: %v", err)
|
124 | 126 | }
|
125 |
| - controllerServer = driver.NewControllerServer(gceDriver, cloudProvider) |
| 127 | + initialBackoffDuration := time.Duration(*errorBackoffInitialDurationMs) * time.Millisecond |
| 128 | + maxBackoffDuration := time.Duration(*errorBackoffMaxDurationMs) * time.Microsecond |
| 129 | + controllerServer = driver.NewControllerServer(gceDriver, cloudProvider, initialBackoffDuration, maxBackoffDuration) |
126 | 130 | } else if *cloudConfigFilePath != "" {
|
127 | 131 | klog.Warningf("controller service is disabled but cloud config given - it has no effect")
|
128 | 132 | }
|
|
0 commit comments