Operator
You can define the configuration parameters that are needed for creating a CSIScaleOperator custom resource that is used to configure the IBM Spectrum Scale Container Storage Interface driver.
For more information, see a sample CSIScaleOperator custom resource configuration YAML file.
- 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: "guisecret"
secureSslMode: false
primary:
primaryFs: "gpfs0"
restApi:
- guiHost: "<FQDN/IP of GUI Node 1>"
#- guiHost: "<FQDN/IP of GUI Node 2>" #Optional - Multiple GUI nodes can be specified if the storage cluster has GUI installed on multiple nodes.
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"
---
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. Optionally, multiple GUI hosts can be specified for a storage cluster with multiple GUIs. In case of multiple guiHosts, use the same port number for all the GUIs on a storage cluster. |
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.1 |
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. |
1Do not update CR to create an
imagePullSecret array with the ibm-spectrum-scale-csi-registrykey
name because the ibm-spectrum-scale-csi-registrykey name is used as a default
secret internally. |
For deployment involving two or more IBM Spectrum Scale clusters, see Remote cluster support.
Status
csiScaleOperator
resource, issue the following
command:kubectl get csiscaleoperator -n ibm-spectrum-scale-csi-driver -ojson | jq -r '.items[0].status'
Output:
{
"conditions": [
{
"lastTransitionTime": "2023-02-22T10:36:47Z",
"message": "The CSI driver resources have been created/updated successfully.",
"reason": "CSIConfigured",
"status": "True",
"type": "Success"
}
],
"versions": [
{
"name": "ibm-spectrum-scale-csi",
"version": "2.9.0"
}
]
}
Condition type | Condition status | Description |
---|---|---|
Success | TRUE | Operator has created all the resources in the cluster required by CSI driver. |
Success | FALSE | Occurred an error while the operator is creating the resources required by CSI driver. |
Success | Unknown | The initial status when the operator reconciliation is in-progress. |
- If
status.condition.status
is False, look forstatus.condition.reason
andstatus.condition.message
to identify the cause of an error. For more information, refer operator logs. - From IBM Spectrum Scale Container Storage Interface driver 2.9.0 onward, after an instance of the custom resource CSIScaleOperator is created, the change in primary stanza of the instance is not allowed as changing the primary stanza causes loss of access to version 1 volumes. If you do not need access to these volumes, you can delete CSIScaleOperator instance and create a new instance with the required primary stanza.
- If you change any value in a cluster stanza of a CSIScaleOperator instance, the changed value will be passed from the operator to the driver only if it is valid. For an invalid value, you can see corresponding error message in the status of CSIScaleOperator instance.