|
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. Default is 200.") |
| 46 | + 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 | 47 |
|
47 | 48 | attachDiskBackoffDuration = flag.Duration("attach-disk-backoff-duration", 5*time.Second, "Duration for attachDisk backoff")
|
48 | 49 | attachDiskBackoffFactor = flag.Float64("attach-disk-backoff-factor", 0.0, "Factor for attachDisk backoff")
|
|
57 | 58 |
|
58 | 59 | maxprocs = flag.Int("maxprocs", 1, "GOMAXPROCS override")
|
59 | 60 |
|
60 |
| - errorBackoffInitialDuration = 200 * time.Millisecond |
61 |
| - |
62 | 61 | version string
|
63 | 62 | )
|
64 | 63 |
|
@@ -124,7 +123,7 @@ func handle() {
|
124 | 123 | if err != nil {
|
125 | 124 | klog.Fatalf("Failed to get cloud provider: %v", err)
|
126 | 125 | }
|
127 |
| - controllerServer = driver.NewControllerServer(gceDriver, cloudProvider, errorBackoffInitialDuration) |
| 126 | + controllerServer = driver.NewControllerServer(gceDriver, cloudProvider, time.Duration(*errorBackoffInitialDurationMs) * time.Millisecond) |
128 | 127 | } else if *cloudConfigFilePath != "" {
|
129 | 128 | klog.Warningf("controller service is disabled but cloud config given - it has no effect")
|
130 | 129 | }
|
|
0 commit comments