VAST Block CSI Driver supports multiple Kubernetes storage classes. During initial deployment of VAST Block CSI Driver, you define one or more storage classes in the driver's Helm chart configuration file. Later you can add more storage classes by creating and applying a Kubernetes YAML configuration file.
Adding a Storage Class
To add a storage class using a Kubernetes YAML configuration file:
Create a YAML configuration file that defines a new storage class with the following required parameters:
Tip
For a complete list of storage class options, and also for detailed information about required and optional parameters, see Storage Class Option Reference.
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: <storage class name> provisioner: block.csi.vastdata.com parameters: subsystem: <NVMe subsystem name> vip_pool_fqdn: <virtual IP pool FQDN> | vip_pool_name: <virtual IP pool name> <optional: pairs of secrets and secret namespaces for each volume processing stage>
For example:
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: block-on-vast provisioner: block.csi.vastdata.com parameters: subsystem: BlockView vip_pool_fqdn: 'MyDomain' csi.storage.k8s.io/controller-expand-secret-name: vast-mgmt csi.storage.k8s.io/controller-expand-secret-namespace: default csi.storage.k8s.io/controller-publish-secret-name: vast-mgmt csi.storage.k8s.io/controller-publish-secret-namespace: default csi.storage.k8s.io/node-publish-secret-name: vast-mgmt csi.storage.k8s.io/node-publish-secret-namespace: default csi.storage.k8s.io/node-stage-secret-name: vast-mgmt csi.storage.k8s.io/node-stage-secret-namespace: default csi.storage.k8s.io/provisioner-secret-name: vast-mgmt csi.storage.k8s.io/provisioner-secret-namespace: default
Deploy the YAML configuration file:
kubectl apply -f <filename>.yaml
Verify that the storage class has been added:
kubectl get storageclasses
The output is similar to the following:
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE standard (default) k8s.io/minikube-hostpath Delete Immediate false 4d1h block-on-vast block.csi.vastdata.com Delete Immediate true 58m
Storage Class Option Reference
You can specify storage class options as follows:
In the Helm chart configuration file created for VAST Block CSI Driver during initial deployment,
In a Kubernetes YAML configuration file deployed at a later stage.
In VAST CSI Operator's
VastStoragecustom resource definition, when deploying in an OpenShift environment using VAST CSI Operator.
Option in Helm chart configuration file/VAST CSI Operator's | Option in Kubernetes YAML configuration file | Description |
|---|---|---|
|
| (Optional) Determines whether volume expansion is allowed (default, |
|
| (Optional) Determines whether VAST Block CSI Driver waits for VAST snapshot or clone operations to complete before allowing Kubernetes to proceed with volume provisioning:
|
|
| (Optional) A format string that controls naming of Kubernetes ephemeral volumes created through VAST Block CSI Driver. If not specified, the default format
|
|
| (Optional) The filesystem type to format the volume. The default is This option is applicable only when the PVC has |
hostEncryption:
luksType: "<type>"
cipher: "<cipher>"
keySize: "<bits>"
hash: "<algorithm>"
pbkdfMemory: "<kilobytes>"
perf-same_cpu_crypt: {true|false}
perf-submit_from_crypt_cpus: {true|false}
perf-no_read_workqueue: {true|false}
perf-no_write_workqueue: {true|false} |
| (Optional) Sets parameters for LUKS-based host encryption:
|
|
| The name of a Quality of Service (QoS) policy to be associated with automatically created views. The QoS policy can be passed either by its name or by its ID (in A QoS policy sets performance limits per view. For more information, see Configure a QoS Policy. |
N/A |
| The ID of a Quality of Service (QoS) policy to be associated with automatically created views. The QoS policy can be passed either by its ID or by its name (in A QoS policy sets performance limits per view. For more information, see Configure a QoS Policy. |
|
| (Optional) Determines whether to delete ( |
|
| These options lets you supply information for communicating with the VAST cluster:
If the secret and its namespace are defined as global options in the Helm chart configuration file, they are automatically propagated to each storage class and each provisioning stage therein. In this case, you do not need to explicitly include the per-stage secrets with their corresponding namespaces in the storage class definition. If no global settings exist for the secret and its namespace, you need to specify them directly in the storage class definition in the following format. Note that you can specify a different value for each stage: csi.storage.k8s.io/controller-expand-secret-name: <secret name> csi.storage.k8s.io/controller-expand-secret-namespace: <secret namespace> csi.storage.k8s.io/controller-publish-secret-name: <secret name> csi.storage.k8s.io/controller-publish-secret-namespace: <secret namespace> csi.storage.k8s.io/node-publish-secret-name: <secret name> csi.storage.k8s.io/node-publish-secret-namespace: <secret namespace> csi.storage.k8s.io/node-stage-secret-name: <secret name> csi.storage.k8s.io/node-stage-secret-namespace: <secret namespace> csi.storage.k8s.io/provisioner-secret-name: <secret name> csi.storage.k8s.io/provisioner-secret-namespace: <secret namespace> |
|
| (Optional) If set to |
|
| (Required) The name of the NVMe subsystem where block volumes will be created. This is the subsystem exposed through the VAST cluster view preconfigured for block storage. |
|
| (Optional) Specify the name of the VAST tenant which is associated with the |
|
| The name of the virtual IP pool to be used by VAST Block CSI Driver. The virtual IP pool that you specify for a storage class must belong to the same VAST Cluster tenant as the VAST Cluster view specified on the Either |
|
| The domain name of the virtual IP pool to be used by VAST Block CSI Driver. The virtual IP pool that you specify for a storage class must belong to the same VAST Cluster tenant as the VAST Cluster view specified on the Either |
|
| (Optional) A format string that controls naming of volumes created through VAST Block CSI Driver. If not specified, the default format
This parameter can be used to provide a nested directory structure for the volumes, for example: |