openshift / local-storage-operator

Operator for local storage
Apache License 2.0
83 stars 71 forks source link

faq : is it possible to control "VOLUMEBINDINGMODE" in storage class which got created by "LocalVolumeSet" or "LocalVolume" #502

Closed Rajpratik71 closed 3 weeks ago

Rajpratik71 commented 1 month ago

Just wanted to find if there any way to control "VOLUMEBINDINGMODE" in storage class which got created by "LocalVolumeSet" or "LocalVolume" ?

e.g. Using below CR, it create a set of disk and also creates db2-direct-disk-sc storage class but with VOLUMEBINDINGMODE WaitForFirstConsumer.

What it looks to me that this is creating issue and conflicting

apiVersion: local.storage.openshift.io/v1alpha1
kind: LocalVolumeSet
metadata:
  finalizers:
  - storage.openshift.com/local-volume-protection
  name: db2-other-disks
  namespace: openshift-local-storage
spec:
  nodeSelector:
    nodeSelectorTerms:
    - matchExpressions:
      - key: cluster.ocs.openshift.io/openshift-storage
        operator: In
        values:
        - ""
  storageClassName: db2-direct-disk-sc
  tolerations:
  - effect: NoSchedule
    key: node.ocs.openshift.io/storage
    operator: Equal
    value: "true"
  volumeMode: Filesystem
  fstype: ext4
  maxDeviceCount: 4 # <-- Maximum number of devices per node to be used, if not defined will use all raw devices
  deviceInclusionSpec:
    deviceTypes:
    # - disk
    - part # <-- Remove this if not using partitions
    deviceMechanicalProperties:
    - Rotational # <-- For HDD change to Rotational
    - NonRotational # <-- For SSD change to NonRotational
    # minSize: 500Gi   # <-- Uncomment and modify to limit the minimum size of disk used
    # maxSize: 10Ti   # <-- Uncomment and modify to limit the maximum size of disk used