Storage Classes

The StorageClasses page contains a list of storage classes.

Screenshot

storageclasses

On the StorageClass page, you can create, edit, delete, or view previously created storage classes. In the created StorageClass resource, only labels and annotations can be changed.

Creating a StorageClass

To add a StorageClass, click on the + Add StorageClass button.

Each StorageClass contains provisioner, parameters, reclaimPolicy, volumeBindingMode fields, which are used when it is necessary to dynamically allocate a PersistentVolume belonging to the class to satisfy a PersistentVolumeClaim (PVC) request.

When configuring StorageClass:

  • you need to set the StorageClass name;
  • it is possible to add labels and annotations;
  • you must select the Provisioner Type. In the graphical interface, the concept of a provider type is introduced to simplify the StorageClass configuration. Available types: oVirt, vSphere, NFS, Rawfile, CephFS, CephRBD, Other.
  • the Provisioner value will be set automatically for all types (except for the Other type):
    • vSphere - csi.vsphere.vmware.com. Information about setting up access rights for the vCenter service account is located on the [vSphere] provider page (/2.13/en/platform-admin/interface/providers/vsphere/vsphere-requirement/).;
    • NFS - nfs.csi.k8s.io;
    • oVirt - csi.ovirt.org;
    • Rawfile -  rawfile.csi.openebs.io;
    • CephFS -  cephfs.csi.ceph.com;
    • CephRBD - bd.csi.ceph.com.
  • it is possible to select the return policy of the PersistentVolume (PV) of the created StorageClass. Select Retain when you need to manually manage PV data in case of PVC deletion. Specify Delete so that after deleting a PVC, the corresponding PV will also be deleted. Default Delete;
  • it is possible to select the PV binding mode. If you need to provide PV immediately after creating the PVC, select Immediate mode. When you want to provide PV only after creating a pod that uses PVC, set the mode to WaitForFirstConsumer. Default is Immediate.
  • it is possible to manage a set of StorageClass parameters.
Screenshot

sccreate1

You can install provider types that are compatible with Kubernetes. By default, the following types of providers are available in the Shturval platform:

  • CephFS Provisioner;
  • CephRBD Provisioner;
  • OpenEBS Rawfile Provisioner;
  • oVirt Provisioner;
  • vSphere Provisioner;
  • NFS Provisioner.

###Setting options

To add a parameter for CephFS, CephRBD, OpenEBS Rawfile providers or when selecting the type of another provider, click on + in the Parameters block. In the window that opens, specify the name of the parameter and its value. Click Add.

Screenshot

addparamrbd addparamrbd1

To configure NFS, vSphere, oVirt, the following default parameters are offered:

Screenshot of parameters for NFS

nfsparam1

  • Valid values for the parameteronDelete: delete, retain, archive.
  • Default in parametermountPermissionsis set to 0. If you need to assign permissions to files and folders, change the value.
Screenshot of parameters for oVirt

ovirtparam1

  • For the option to allocate storage space not immediately when creating a disk, but as the need for it arisesthinProvisioningvalid values: true, false.
  • For the file system type parameterovirtFstypevalid values: ext4, xfs.
Screenshot of parameters for vSphere

vspherparam1

  • For the file system type parametervsphereFstypevalid values: ext4, xfs.

To set a value for a parameter, click on the line of the selected parameter and in the window that opens, enter data in the Value field, click Change.

Screenshot

editparam2

If the parameter set is not suitable, you can:

  • add a new parameter. Click on + in the Parameters block, in the window that opens, specify the name of the parameter and its value. Click Add;
Screenshot

addparamvs

addparamvs1

  • change an existing parameter. Click on the line with the name of the parameter you are interested in and make changes, click Change;
Screenshot

editparam8

  • delete an existing parameter. Click on the line with the name of the parameter you are interested in, click on;
Screenshot

deleteparam

  • select the provider type Other and configure the required parameters.
Screenshot

addparam5

addparam4

View and change StorageClass

On the page of the created StorageClass there is an opportunity:

  • view storage class data, StorageClass tab.
  • see a list of PersistentVolumes that use this storage class, PersistentVolumes tab. By clicking on the line called PersistentVolume you can go to the PersistentVolume view page;
  • adjust the list of labels and annotations on the Labels and annotations tab;
  • view the StorageClass manifest, and also adjust the list of labels and annotations in the StorageClass manifest.
Screenshot

scview

To adjust the list of labels and annotations in the StorageClass manifest, go to the Manifest tab and make changes. After modifying the manifest, click Apply. The test result will be displayed on the right side of the screen. Expand the verification result block to see the full manifest.

Save the changes you made to the manifest. Unsaved changes will not be applied.

You can delete StorageClass in one of the following ways:

  • on the StorageClasses page clickin object string;
  • on the StorageClass viewing page, on the StorageClass tab, click the Delete button;
  • on the StorageClass viewing page, go to the Manifest tab and click.