mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
36 lines
2.0 KiB
Plaintext
36 lines
2.0 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// microshift/volume-snapshots-microshift.adoc
|
|
|
|
:_mod-docs-content-type: CONCEPT
|
|
[id="microshift-storage-classes_{context}"]
|
|
= Storage classes
|
|
|
|
Storage classes provide the workload layer interface for selecting a device class. The following storage class parameters are supported in {microshift-short}:
|
|
|
|
* The `csi.storage.k8s.io/fstype` parameter selects the file system types. Both `xfs` and `ext4` file system types are supported.
|
|
* The `topolvm.io/device-class` parameter is the name of the device class. If a device class is not provided, the default device class is assumed.
|
|
|
|
Multiple storage classes can refer to the same device class. You can provide varying sets of parameters for the same backing device class, such as `xfs` and `ext4` variants.
|
|
|
|
.Example {microshift-short} default storage class resource
|
|
[source,yaml]
|
|
----
|
|
apiVersion: storage.k8s.io/v1
|
|
kind: StorageClass
|
|
metadata:
|
|
annotations:
|
|
storageclass.kubernetes.io/is-default-class: "true" <1>
|
|
name: topolvm-provisioner
|
|
parameters:
|
|
"csi.storage.k8s.io/fstype": "xfs" <2>
|
|
provisioner: topolvm.io <3>
|
|
reclaimPolicy: Delete
|
|
volumeBindingMode: WaitForFirstConsumer <4>
|
|
allowVolumeExpansion: <5>
|
|
----
|
|
<1> An example of the default storage class. If a PVC does not specify a storage class, this class is assumed. There can only be one default storage class in a {microshift-short} node. Having no value assigned to this annotation is also supported.
|
|
<2> Specifies which file system to provision on the volume. Options are "xfs" and "ext4".
|
|
<3> Identifies which provisioner should manage this class.
|
|
<4> Specifies whether to provision the volume before a client pod is present or immediately. Options are `WaitForFirstConsumer` and `Immediate`. `WaitForFirstConsumer` is recommended to ensure that storage is only provisioned for pods that can be scheduled.
|
|
<5> Specifies if PVCs provisioned from the `StorageClass` permit expansion. The {microshift-short} LVMS CSI plugin does support volume expansion, but if this value is set to `false`, expansion is blocked. |