Operator

You can define the configuration parameters that are needed for creating a CSIScaleOperator custom resource that is used to configure IBM Spectrum Scale Container Storage Interface driver.

A sample CSIScaleOperator custom resource configuration YAML file is available here: Start of changehttps://raw.githubusercontent.com/IBM/ibm-spectrum-scale-csi/v2.4.0/operator/config/samples/csiscaleoperators.csi.ibm.com_cr.yamlEnd of change.

Figure 1. Operator configuration
Operator concept.
  • Primary cluster: IBM Spectrum Scale cluster where some or all of the client nodes are also worker nodes of Red Hat® OpenShift®/Kubernetes cluster. The aim of running IBM Spectrum Scale on worker node is to provide persistent storage from IBM Spectrum Scale to the application running on Kubernetes/Red Hat OpenShift.
  • Primary file system: One of the existing IBM Spectrum Scale file systems from the primary cluster must be designated as the primary file system. One fileset from this file system is used by the IBM Spectrum Scale Container Storage Interface driver internally to store the volume references. This fileset is referred to as primary fileset. For proper functioning of IBM Spectrum Scale Container Storage Interface driver, the primary file system must be mounted on all worker nodes all the time.

The CSIScaleOperator custom resource for a sample deployment looks like the following sample as shown. There are two file systems gpfs0 and gpfs1. For this deployment, we chose gpfs0 as PrimaryFs.

csiscaleoperators.csi.ibm.com_cr.yaml file


---
apiVersion: csi.ibm.com/v1
kind: "CSIScaleOperator"
metadata:
  name: "ibm-spectrum-scale-csi"
  namespace: "ibm-spectrum-scale-csi-driver"
  labels:
    app.kubernetes.io/name: ibm-spectrum-scale-csi-operator
    app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator
    app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator
    release: ibm-spectrum-scale-csi-operator
status: {}
spec:
    clusters:
    - id: "<cluster id of IBM Spectrum Scale running on node1,node2,node3>"
      secrets: "guisecretNode1"
      secureSslMode: false
      primary:
        primaryFs: "gpfs0"
      restApi:
        - guiHost: "<FQDN/IP of Node 1>"
  attacherNodeSelector:
    - key: "scale"
      value: "true"
  provisionerNodeSelector:
    - key: "scale"
      value: "true"
  pluginNodeSelector:
    - key: "scale"
      value: "true"
  snapshotterNodeSelector:
    - key: "scale"
      value: "true"
  resizerNodeSelector:
    - key: "scale"
      value: "true"
---
Table 1. CSIScaleOperator configuration parameter description
Parameter Usage Description
id Mandatory Cluster ID of the primary IBM Spectrum Scale cluster. For more information, see mmlscluster command in the IBM Spectrum Scale: Concepts, Planning, and Installation Guide.
primaryFs Mandatory Primary file system name.
primaryFset Optional Primary fileset name. This will be created if the fileset does not exist. Default value: spectrum-scale-csi-volume-store
inodeLimit Optional Inode limit for the primary fileset. If not specified, fileset is created with 1 M inodes, which is the IBM Spectrum Scale default.
cacert Mandatory if secureSslMode is true. Name of the pre-created CA certificate configmap that is used to connect to the GUI server (running on the "guiHost"). For more information, see Certificates.
secrets Mandatory Name of the pre-created Secret containing username and password that are used to connect to the GUI server for the cluster specified against the id parameter. For more information, see Secrets.
guiHost Mandatory FQDN or IP address of the GUI node of IBM Spectrum Scale cluster that is specified against the id parameter.
imagePullSecrets Optional An array of imagePullSecrets to be used for pulling images from a private registry. This is a pass-through option that distributes the imagePullSecrets array to the containers generated by the Operator. For more information on creating imagePullSecrets, see Pull an Image from a Private Registry in the Kubernetes documentation.
kubeletRootDirPath Optional The kubelet root directory path is used in case the Kubernetes setup uses a non-default kubelet root directory path. The default kubelet's root directory is located at /var/lib/kubelet.

For deployment involving two or more IBM Spectrum Scale clusters, see Remote cluster support.