Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSDOCS-12422#VolumeAttributesClass TP #85302

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions modules/storage-persistent-storage-pvc-volumeattributesclass.adoc
Original file line number Diff line number Diff line change
@@ -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:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restate that this field can be update on existing bound PVC? @gnufied

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

+
.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.
10 changes: 10 additions & 0 deletions storage/understanding-persistent-storage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down