Managing Container Storage Interface (CSI) component placements

You can set tolerations to run the Container Storage Interface (CSI) components on the infra nodes with custom taints.

About this task

Each cluster consists of multiple dedicated nodes such as infra and storage nodes. An infra node with a custom taint cannot use Fusion Data Foundation Persistent Volume Claims (PVCs) on the node unless the required tolerations are added. To use such nodes, configure tolerations to bring up csi-plugins on the nodes.

Procedure

  1. Get the list of subscriptions.
    Command example:
    oc get subs -n openshift-storage
    Example output:
    NAME                                                                         PACKAGE                   SOURCE             CHANNEL
    mcg-operator-stable-4.16-redhat-operators-openshift-marketplace              mcg-operator              redhat-operators   stable-4.16
    ocs-client-operator-stable-4.16-redhat-operators-openshift-marketplace       ocs-client-operator       redhat-operators   stable-4.16
    ocs-operator-stable-4.16-redhat-operators-openshift-marketplace              ocs-operator              redhat-operators   stable-4.16
    odf-csi-addons-operator-stable-4.16-redhat-operators-openshift-marketplace   odf-csi-addons-operator   redhat-operators   stable-4.16
    odf-operator                                                                 odf-operator              redhat-operators   stable-4.16
    odf-prometheus-operator-stable-4.16-redhat-operators-openshift-marketplace   odf-prometheus-operator   redhat-operators   stable-4.16
    recipe-stable-4.16-redhat-operators-openshift-marketplace                    recipe                    redhat-operators   stable-4.16
    rook-ceph-operator-stable-4.16-redhat-operators-openshift-marketplace        rook-ceph-operator        redhat-operators   stable-4.16
  2. Edit the odf-operator subscriptions to add the required toleration to the odf-console, odf-operator-controller-manager, ocs-operator, rook-ceph-operator, csi-addons-controller-manager, ux-backend-server, and noobaa-operator pods.
    Command example:
    oc edit sub odf-operator -n openshift-storage
    Toleration example:
    spec:
      config:
        tolerations:
        - effect: NoSchedule
          key: xyz
          operator: Equal
          value: "true"
        - effect: NoSchedule
          key: node.ocs.openshift.io/storage
          operator: Equal
          value: "true"
    Remember: Save your changes before exiting the editor.
  3. Edit the StorageCluster custom resource (CR) to add the desired toleration for the Rook Ceph, Noobaa, csi-plugin, csi-provisioner, metrics-exporter, toolbox, ocs-provider-server, and blackbox-exporter pods.

    To add tolerations to CSI pods, do not pass CSI‑specific tolerations in the StorageCluster CR. Instead, follow these steps:

    1. List all CSI drivers that need tolerations for custom taints.
      Command example:
      oc get driver
      Example output:
      NAME                                    AGE
      openshift-storage.cephfs.csi.ceph.com   6d23h
      openshift-storage.nfs.csi.ceph.com      6d23h
      openshift-storage.rbd.csi.ceph.com      6d23h
    2. Edit the listed drivers to add tolerations for custom taints.
      Command example:
      oc edit driver <driver_name> -n openshift-storage
      Toleration example:
      spec
        controllerPlugin:
          tolerations:
          - effect: NoSchedule
            key: xyz
            operator: Equal
            value: "true"
          - effect: NoSchedule
            key: node.ocs.openshift.io/storage
            operator: Equal
            value: "true"
        nodePlugin:
          tolerations:
          - effect: NoSchedule
            key: xyz
            operator: Equal
            value: "true"
          - effect: NoSchedule
            key: node.ocs.openshift.io/storage
            operator: Equal
            value: "true"
          blackbox-exporter:
            tolerations:
            - effect: NoSchedule
              key: xyz
              operator: Equal
              value: "true"
            - effect: NoSchedule
              key: node.ocs.openshift.io/storage
              operator: Equal
              value: "true"
      Remember: Save your changes before exiting the editor.
    Command example:
    oc edit storagecluster ocs-storagecluster -n openshift-storage
    Toleration example:
    
    spec:
      placement:
        all:
          tolerations:
          - effect: NoSchedule
            key: xyz
            operator: Equal
            value: "true"
          - effect: NoSchedule
            key: node.ocs.openshift.io/storage
            operator: Equal
            value: "true"
        csi-plugin:
          tolerations:
          - effect: NoSchedule
            key: xyz
            operator: Equal
            value: "true"
          - effect: NoSchedule
            key: node.ocs.openshift.io/storage
            operator: Equal
            value: "true"
        csi-provisioner:
          tolerations:
          - effect: NoSchedule
            key: xyz
            operator: Equal
            value: "true"
          - effect: NoSchedule
            key: node.ocs.openshift.io/storage
            operator: Equal
            value: "true"
        mds:
          tolerations:
          - effect: NoSchedule
            key: xyz
            operator: Equal
            value: "true"
          - effect: NoSchedule
            key: node.ocs.openshift.io/storage
            operator: Equal
            value: "true"
        metrics-exporter:
          tolerations:
          - effect: NoSchedule
            key: xyz
            operator: Equal
            value: "true"
          - effect: NoSchedule
            key: node.ocs.openshift.io/storage
            operator: Equal
            value: "true"
        noobaa-core:
          tolerations:
          - effect: NoSchedule
            key: xyz
            operator: Equal
            value: "true"
          - effect: NoSchedule
            key: node.ocs.openshift.io/storage
            operator: Equal
            value: "true"
        rgw:
          tolerations:
          - effect: NoSchedule
            key: xyz
            operator: Equal
            value: "true"
          - effect: NoSchedule
            key: node.ocs.openshift.io/storage
            operator: Equal
            value: "true"
        toolbox:
          tolerations:
          - effect: NoSchedule
            key: xyz
            operator: Equal
            value: "true"
          - effect: NoSchedule
            key: node.ocs.openshift.io/storage
            operator: Equal
            value: "true"
        api-server:
          tolerations:
          - effect: NoSchedule
            key: xyz
            operator: Equal
            value: "true"
          - effect: NoSchedule
            key: node.ocs.openshift.io/storage
            operator: Equal
            value: "true"
    Remember: Save your changes before exiting the editor.