diff --git a/README.md b/README.md index f79903734..a11240618 100644 --- a/README.md +++ b/README.md @@ -206,7 +206,7 @@ Specifically, `deploy/kubernetes/snapshot-controller/setup-snapshot-controller.y #### Other recognized arguments * `--kubeconfig `: Path to Kubernetes client configuration that the snapshot controller uses to connect to Kubernetes API server. When omitted, default token provided by Kubernetes will be used. This option is useful only when the snapshot controller does not run as a Kubernetes pod, e.g. for debugging. -* `--resync-period `: Internal resync interval when the snapshot controller re-evaluates all existing `VolumeSnapshot` instances and tries to fulfill them, i.e. create / delete corresponding snapshots. It does not affect re-tries of failed calls! It should be used only when there is a bug in Kubernetes watch logic. Default is 15 minutes. +* `--resync-period `: Internal resync interval when the snapshot controller re-evaluates all existing `VolumeSnapshot` instances and tries to fulfill them, i.e. create / delete corresponding snapshots. It does not affect re-tries of failed calls! It should be used only when there is a bug in Kubernetes watch logic. Default is 0 and resyncs are turned off. * `--version`: Prints current snapshot controller version and quits. @@ -252,7 +252,7 @@ Specifically, `deploy/kubernetes/snapshot-controller/setup-snapshot-controller.y #### Other recognized arguments * `--kubeconfig `: Path to Kubernetes client configuration that the CSI external-snapshotter uses to connect to Kubernetes API server. When omitted, default token provided by Kubernetes will be used. This option is useful only when the external-snapshotter does not run as a Kubernetes pod, e.g. for debugging. -* `--resync-period `: Internal resync interval when the CSI external-snapshotter re-evaluates all existing `VolumeSnapshotContent` instances and tries to fulfill them, i.e. update / delete corresponding snapshots. It does not affect re-tries of failed CSI calls! It should be used only when there is a bug in Kubernetes watch logic. Default is 15 minutes. +* `--resync-period `: Internal resync interval when the CSI external-snapshotter re-evaluates all existing `VolumeSnapshotContent` instances and tries to fulfill them, i.e. update / delete corresponding snapshots. It does not affect re-tries of failed CSI calls! It should be used only when there is a bug in Kubernetes watch logic. Default is 0 and resyncs are turned off. * `--version`: Prints current CSI external-snapshotter version and quits. diff --git a/cmd/csi-snapshotter/main.go b/cmd/csi-snapshotter/main.go index 1515b84bd..f65b96ff5 100644 --- a/cmd/csi-snapshotter/main.go +++ b/cmd/csi-snapshotter/main.go @@ -62,7 +62,7 @@ const ( var ( kubeconfig = flag.String("kubeconfig", "", "Absolute path to the kubeconfig file. Required only when running out of cluster.") csiAddress = flag.String("csi-address", "/run/csi/socket", "Address of the CSI driver socket.") - resyncPeriod = flag.Duration("resync-period", 15*time.Minute, "Resync interval of the controller. Default is 15 minutes") + resyncPeriod = flag.Duration("resync-period", 0*time.Second, "Resync interval of the controller. Default is 0, and resyncs are turned off.") snapshotNamePrefix = flag.String("snapshot-name-prefix", "snapshot", "Prefix to apply to the name of a created snapshot") snapshotNameUUIDLength = flag.Int("snapshot-name-uuid-length", -1, "Length in characters for the generated uuid of a created snapshot. Defaults behavior is to NOT truncate.") showVersion = flag.Bool("version", false, "Show version.") diff --git a/cmd/snapshot-controller/main.go b/cmd/snapshot-controller/main.go index 346d51d4b..7a9888ef4 100644 --- a/cmd/snapshot-controller/main.go +++ b/cmd/snapshot-controller/main.go @@ -53,7 +53,7 @@ import ( // Command line flags var ( kubeconfig = flag.String("kubeconfig", "", "Absolute path to the kubeconfig file. Required only when running out of cluster.") - resyncPeriod = flag.Duration("resync-period", 15*time.Minute, "Resync interval of the controller.") + resyncPeriod = flag.Duration("resync-period", 0*time.Second, "Resync interval of the controller. Defaults to 0, and resyncs are turned off.") showVersion = flag.Bool("version", false, "Show version.") threads = flag.Int("worker-threads", 10, "Number of worker threads.")