diff --git a/Documentation/Helm-Charts/operator-chart.md b/Documentation/Helm-Charts/operator-chart.md index c53d9f0b6..8963580f1 100644 --- a/Documentation/Helm-Charts/operator-chart.md +++ b/Documentation/Helm-Charts/operator-chart.md @@ -136,6 +136,7 @@ The following table lists the configurable parameters of the rook-operator chart | `discover.tolerationKey` | The specific key of the taint to tolerate | `nil` | | `discover.tolerations` | Array of tolerations in YAML format which will be added to discover deployment | `nil` | | `discoverDaemonUdev` | Blacklist certain disks according to the regex provided. | `nil` | +| `discoveryDaemonInterval` | Set the discovery daemon device discovery interval (default to 60m) | `"60m"` | | `enableDiscoveryDaemon` | Enable discovery daemon | `false` | | `enableOBCWatchOperatorNamespace` | Whether the OBC provisioner should watch on the operator namespace or not, if not the namespace of the cluster will be used | `true` | | `hostpathRequiresPrivileged` | Runs Ceph Pods as privileged to be able to write to `hostPaths` in OpenShift with SELinux restrictions. | `false` | diff --git a/deploy/charts/rook-ceph/templates/deployment.yaml b/deploy/charts/rook-ceph/templates/deployment.yaml index 37c92fcec..c91ba3d2f 100644 --- a/deploy/charts/rook-ceph/templates/deployment.yaml +++ b/deploy/charts/rook-ceph/templates/deployment.yaml @@ -85,7 +85,8 @@ spec: {{- end }} - name: ROOK_DISABLE_DEVICE_HOTPLUG value: "{{ .Values.disableDeviceHotplug }}" - + - name: ROOK_DISCOVER_DEVICES_INTERVAL + value: "{{ .Values.discoveryDaemonInterval }}" - name: NODE_NAME valueFrom: fieldRef: diff --git a/deploy/charts/rook-ceph/values.yaml b/deploy/charts/rook-ceph/values.yaml index 65504d448..9bd7fbd0b 100644 --- a/deploy/charts/rook-ceph/values.yaml +++ b/deploy/charts/rook-ceph/values.yaml @@ -579,6 +579,8 @@ csi: # -- Enable discovery daemon enableDiscoveryDaemon: false +# -- Set the discovery daemon device discovery interval (default to 60m) +discoveryDaemonInterval: 60m # -- The timeout for ceph commands in seconds cephCommandsTimeoutSeconds: "15" diff --git a/pkg/operator/discover/discover.go b/pkg/operator/discover/discover.go index 836240824..bf543524b 100644 --- a/pkg/operator/discover/discover.go +++ b/pkg/operator/discover/discover.go @@ -81,10 +81,7 @@ func (d *Discover) Start(ctx context.Context, namespace, discoverImage, security } func (d *Discover) createDiscoverDaemonSet(ctx context.Context, namespace, discoverImage, securityAccount string, data map[string]string, useCephVolume bool) error { - discoveryInterval := k8sutil.GetValue(data, discoverIntervalEnv, "") - if discoverImage == "" { - discoveryInterval = defaultDiscoverInterval - } + discoveryInterval := k8sutil.GetValue(data, discoverIntervalEnv, defaultDiscoverInterval) discoveryParameters := []string{"discover", "--discover-interval", discoveryInterval}