Skip to content

Commit 95f5e79

Browse files
author
Lisa Pettyjohn
committed
OSDOCS-12422#VolumeAttributesClass TP
1 parent 799bdc3 commit 95f5e79

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * storage/understanding-persistent-storage.adoc
4+
//
5+
6+
:_mod-docs-content-type: CONCEPT
7+
[id="storage-persistent-storage-pvc-volumeattributesclass_{context}"]
8+
= Volume Attributes Classes
9+
10+
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.
11+
12+
:FeatureName: Volume Attributes Classes
13+
include::snippets/technology-preview.adoc[leveloffset=+1]
14+
15+
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).
16+
17+
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.
18+
19+
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.
20+
21+
== Limitations
22+
Volume Attributes Classes has the following limitations:
23+
24+
* When using with GCP, `diskType` must be set to `hyperdisk-balanced`.
25+
26+
* No more than 512 parameters can be defined for a `VolumeAttributesClass`.
27+
28+
* The total length of the parameter's object, including its keys and values, cannot exceed 256 KiB.
29+
30+
== Enabling Volume Attributes Classes
31+
Volume Attributes Classes are not enabled by default.
32+
33+
To enable Volume Attributes Classes, follow the procedure in section _Enabling {product-title} features using FeatureGates_.
34+
35+
== Defining Volume Attributes Classes
36+
37+
The following is an example Volume Attributes Class YAML file.
38+
39+
.`VolumeAttributesClass` definition example
40+
[source,yaml]
41+
----
42+
apiVersion: storage.k8s.io/v1beta1
43+
kind: VolumeAttributesClass <1>
44+
metadata:
45+
name: silver <2>
46+
driverName: ebs.csi.aws.com <3>
47+
parameters:
48+
iops: "300"
49+
throughput: "125"
50+
type: io2 <4>
51+
...
52+
----
53+
<1> Defines object as Volumes Attributes Classes
54+
<2> Name of the `VolumeAttributesClass`. In this example, it is "silver".
55+
<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.
56+
<4> Disk type.
57+
58+
== Applying a Volume Attribute Class to a PVC
59+
In addition to newly created PVCs, you can also update existing bound PVCs with a Volume Attribute Class.
60+
61+
To apply a Volume Attribute Class to a PVC:
62+
63+
* Set the PVC's `volumeAttributesClassName` parameter to the Volume Attribute Class's name:
64+
+
65+
.PVC definition example specifying a Volume Attribute Class
66+
+
67+
[source,yaml]
68+
----
69+
apiVersion: v1
70+
kind: PersistentVolumeClaim
71+
metadata:
72+
name: test-pv-claim
73+
spec:
74+
75+
volumeAttributesClassName: silver <1>
76+
----
77+
<1> Specifies using the Volume Attribute Class "silver" for this PVC.

storage/understanding-persistent-storage.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
2424
2525
include::modules/storage-persistent-storage-pvc.adoc[leveloffset=+1]
2626
27+
ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
28+
include::modules/storage-persistent-storage-pvc-volumeattributesclass.adoc[leveloffset=+2]
29+
endif::[]
30+
31+
ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
32+
[role="_additional-resources"]
33+
.Additional resources
34+
* xref:../nodes/clusters/nodes-cluster-enabling-features.adoc#nodes-cluster-enabling-features[Enabling {product-title} features using FeatureGates]
35+
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
36+
2737
include::modules/storage-persistent-storage-block-volume.adoc[leveloffset=+1]
2838
2939
// As these volumes have transitioned to being tech preview per plugin,

0 commit comments

Comments
 (0)