diff --git a/modules/storage-persistent-storage-pvc-volumeattributesclass.adoc b/modules/storage-persistent-storage-pvc-volumeattributesclass.adoc new file mode 100644 index 000000000000..4f4e7873a328 --- /dev/null +++ b/modules/storage-persistent-storage-pvc-volumeattributesclass.adoc @@ -0,0 +1,68 @@ +// Module included in the following assemblies: +// +// * storage/understanding-persistent-storage.adoc +// + +:_mod-docs-content-type: CONCEPT +[id="storage-persistent-storage-pvc-volumeattributesclass_{context}"] += Volume Attributes Classes + +Volume Attributes Classes provide a way for administrators to describe "classes" of storage they offer. Different classes might correspond to different quality-of-service levels. + +:FeatureName: Volume Attributes Classes +include::snippets/technology-preview.adoc[leveloffset=+1] + +Volume Attributes Classes in {product-title} is available only with AWS Elastic Block Storage (EBS) and Google Cloud Platform (GCP) persistent disk (PD) Container Storage Interface (CSI). + +You can apply a Volume Attributes Class to a persistent volume claim (PVC). If a new Volume Attributes Class becomes available in the cluster, a user can update the PVC with the new Volume Attributes Class if needed. + +Volume Attribute Classes have parameters that describe volumes belonging to them. Different parameters can be accepted depending on the provisioner or the resizer. If a parameter is omitted, the default is used at volume provisioning. If a user applies the PVC with a different Volume Attributes Class with omitted parameters, the default value of the parameters might be used depending on the CSI driver implementation. For more information, see the related CSI driver documentation. + +There can be at most 512 parameters defined for a `VolumeAttributesClass`. The total length of the parameters object including its keys and values cannot exceed 256 KiB. + +== Enabling Volume Attributes Classes +Volume Attributes Classes are not enabled by default. + +To enable Volume Attributes Classes, follow the procedure in section _Enabling {product-title} features using FeatureGates_. + +== Defining Volume Attributes Classes + +The following is an example Volume Attributes Class YAML file. + +.`VolumeAttributesClass` definition example +[source,yaml] +---- +apiVersion: storage.k8s.io/v1beta1 +kind: VolumeAttributesClass <1> +metadata: + name: silver <2> +driverName: ebs.csi.aws.com <3> +parameters: + iopsPerGB: "300" + throughput: "125" + ... +---- +<1> Defines object as Volumes Attributes Classes +<2> Name of the `VolumeAttributesClass`. In this example, it is "silver". +<3> The provisioner that determines what volume plugin is used for provisioning persistent volumes (PVs). In this example, it is "ebs.csi.aws.com" for AWS EBS. + +== Applying a Volume Attribute Class to a PVC +In addition to newly created PVCs, you can also update existing bound PVCs with a Volume Attribute Class. + +To apply a Volume Attribute Class to a PVC: + +* Set the PVC's `volumeAttributesClassName` parameter to the Volume Attribute Class's name: ++ +.PVC definition example specifying a Volume Attribute Class ++ +[source,yaml] +---- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: test-pv-claim +spec: + … + volumeAttributesClassName: silver <1> +---- +<1> Specifies using the Volume Attribute Class "silver" for this PVC. \ No newline at end of file diff --git a/storage/understanding-persistent-storage.adoc b/storage/understanding-persistent-storage.adoc index f5609756dc44..24414a3842f5 100644 --- a/storage/understanding-persistent-storage.adoc +++ b/storage/understanding-persistent-storage.adoc @@ -24,6 +24,16 @@ endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[] include::modules/storage-persistent-storage-pvc.adoc[leveloffset=+1] +ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[] +include::modules/storage-persistent-storage-pvc-volumeattributesclass.adoc[leveloffset=+2] +endif::[] + +ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[] +[role="_additional-resources"] +.Additional resources +* xref:../nodes/clusters/nodes-cluster-enabling-features.adoc#nodes-cluster-enabling-features[Enabling {product-title} features using FeatureGates] +endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[] + include::modules/storage-persistent-storage-block-volume.adoc[leveloffset=+1] // As these volumes have transitioned to being tech preview per plugin,