|
40 | 40 | runNodeService = flag.Bool("run-node-service", true, "If set to false then the CSI driver does not activate its node service (default: true)")
|
41 | 41 | 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.")
|
42 | 42 | metricsPath = flag.String("metrics-path", "/metrics", "The HTTP path where prometheus metrics will be exposed. Default is `/metrics`.")
|
| 43 | + grpcLogCharCap = flag.Int("grpc-log-char-cap", 10000, "The maximum amount of characters logged for every grpc responses") |
43 | 44 |
|
44 |
| - 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") |
45 | 48 |
|
46 | 49 | attachDiskBackoffDuration = flag.Duration("attach-disk-backoff-duration", 5*time.Second, "Duration for attachDisk backoff")
|
47 | 50 | attachDiskBackoffFactor = flag.Float64("attach-disk-backoff-factor", 0.0, "Factor for attachDisk backoff")
|
@@ -121,7 +124,9 @@ func handle() {
|
121 | 124 | if err != nil {
|
122 | 125 | klog.Fatalf("Failed to get cloud provider: %v", err)
|
123 | 126 | }
|
124 |
| - 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) |
125 | 130 | } else if *cloudConfigFilePath != "" {
|
126 | 131 | klog.Warningf("controller service is disabled but cloud config given - it has no effect")
|
127 | 132 | }
|
@@ -159,5 +164,5 @@ func handle() {
|
159 | 164 | gce.WaitForOpBackoff.Steps = *waitForOpBackoffSteps
|
160 | 165 | gce.WaitForOpBackoff.Cap = *waitForOpBackoffCap
|
161 | 166 |
|
162 |
| - gceDriver.Run(*endpoint) |
| 167 | + gceDriver.Run(*endpoint, *grpcLogCharCap) |
163 | 168 | }
|
0 commit comments