Skip to content

Commit 5ae3e6e

Browse files
committed
KEP-3751: Fix the heading level for easier read
Also removes some incorrect copies of content. And fixed an link.
1 parent 20c9001 commit 5ae3e6e

File tree

1 file changed

+20
-121
lines changed
  • keps/sig-storage/3751-volume-attributes-class

1 file changed

+20
-121
lines changed

keps/sig-storage/3751-volume-attributes-class/README.md

Lines changed: 20 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,15 @@
6262
- [Other Solutions:](#other-solutions)
6363
- [Option 1: First class only Iops and throughput](#option-1-first-class-only-iops-and-throughput)
6464
- [Kubernetes API](#kubernetes-api-1)
65-
- [CSI API](#csi-api-1)
66-
- [Pros:](#pros)
67-
- [Cons:](#cons)
68-
- [Option 2: Opaque map in CreateVolume and ModifyVolume requests by end users](#option-2-opaque-map-in-createvolume-and-modifyvolume-requests-by-end-users)
69-
- [Pros:](#pros-1)
70-
- [Cons:](#cons-1)
71-
- [Option 3: A cluster administrator modifies the VolumeAttributesClass parameters which will cause all PVCs using that performance class to be updated.](#option-3-a-cluster-administrator-modifies-the-volumeattributesclass-parameters-which-will-cause-all-pvcs-using-that-performance-class-to-be-updated)
72-
- [CreateVolume](#createvolume)
73-
- [ModifyVolume](#modifyvolume)
74-
- [Pros:](#pros-2)
75-
- [Cons:](#cons-2)
65+
- [CSI API](#csi-api-1)
66+
- [Pros:](#pros)
67+
- [Cons:](#cons)
68+
- [Option 2: Opaque map in CreateVolume and ModifyVolume requests by end users](#option-2-opaque-map-in-createvolume-and-modifyvolume-requests-by-end-users)
69+
- [Pros:](#pros-1)
70+
- [Cons:](#cons-1)
71+
- [Option 3: A cluster administrator modifies the VolumeAttributesClass parameters which will cause all PVCs using that performance class to be updated.](#option-3-a-cluster-administrator-modifies-the-volumeattributesclass-parameters-which-will-cause-all-pvcs-using-that-performance-class-to-be-updated)
72+
- [Pros:](#pros-2)
73+
- [Cons:](#cons-2)
7674
- [Appendix - Current SPs Case Study](#appendix---current-sps-case-study)
7775
- [Infrastructure Needed (Optional)](#infrastructure-needed-optional)
7876
<!-- /toc -->
@@ -129,7 +127,7 @@ Currently after CreateVolume with provider specific parameters pass in storage c
129127
## Proposal
130128

131129
### Kubernetes API
132-
We need to add a new resource object VolumeAttributesClass to Kubernetes API, also a new admission controller and vac protection controller. Please see more in [Design Details](#bookmark=id.wtvwymf8202g).
130+
We need to add a new resource object VolumeAttributesClass to Kubernetes API, also a new admission controller and vac protection controller. Please see more in [Design Details](#design-details).
133131

134132
The reason why we cannot use StorageClass.parameters is because StorageClass is immutable today. The design is to introduce a VolumeAttributesClass with parameters. Although these parameters are still immutable within a VolumeAttributesClass, the name of VolumeAttributesClass in a PVC can be modified. This allows the parameters representing volume attributes to be updated after a volume is created.
135133

@@ -1122,7 +1120,7 @@ requests:
11221120
Add PVC Status field; change ResizeStatus alpha field to AllocatedResourceStatus map.
11231121

11241122

1125-
##### CSI API
1123+
#### CSI API
11261124

11271125
The CSI create request will be extended to add provisioned IO parameters. For volume creation, cloud providers can add iops and throughput field in parameters and process in the csi driver, an example:
11281126

@@ -1255,18 +1253,18 @@ IO provisioning should have similar issues to resize (except that we have to sol
12551253
For ResourceQuota, we will verify that sum of spec.resources[iops] and spec.resources[throughput] for all PVCs in the Namespace from DSW don't exceed quota, for LimitRanger we check that a modify request does not violate the min and max limits specified in LimitRange for the pvc's namespace.
12561254

12571255

1258-
##### Pros:
1256+
#### Pros:
12591257

12601258
* Simplify user experience by giving only restricted, well defined controls
12611259

1262-
##### Cons:
1260+
#### Cons:
12631261

12641262

12651263
* Difficult to get consensus of what is iops/throughput among different storage providers
12661264
* Not all the storage providers support independently configurable iops/throughput
12671265

12681266

1269-
#### Option 2: Opaque map in CreateVolume and ModifyVolume requests by end users
1267+
### Option 2: Opaque map in CreateVolume and ModifyVolume requests by end users
12701268

12711269
The users will set the volume performance parameters directly in the PVC:
12721270

@@ -1305,19 +1303,19 @@ message ModifyVolumeRequest {
13051303

13061304

13071305

1308-
##### Pros:
1306+
#### Pros:
13091307

13101308
* Flexible to fit into all the cloud providers
13111309
* More flexibility to end users and no cluster administrator needs to be involved(also a con)
13121310

13131311

1314-
##### Cons:
1312+
#### Cons:
13151313

13161314
* More unpredictable behaviors because it is an opaque map. Compared to the recommended approach that the cluster administrator actually has the control over the values.
13171315
* Not portable across different cloud providers.
13181316

13191317

1320-
#### Option 3: A cluster administrator modifies the VolumeAttributesClass parameters which will cause all PVCs using that performance class to be updated.
1318+
### Option 3: A cluster administrator modifies the VolumeAttributesClass parameters which will cause all PVCs using that performance class to be updated.
13211319

13221320
![VolumeAttributesClass Batch Update](./VolumeAttributesClass-BatchUpdate.png)
13231321

@@ -1341,113 +1339,14 @@ If there is a change in parameters, an event will trigger the following func in
13411339
func (ctrl *resizeController) updateVolumeAttributesClass(vqc *v1.VolumeAttributesClass) (error, bool) {...}
13421340
```
13431341

1344-
Under this operation, it will get all the pvcs consuming the volume Performance class and call expandAndRecover to update the volume Performance parameters. The update the volume Performance parameters will overlap with the following path “**Watching changes in the PVC object**
1342+
Under this operation, it will get all the pvcs consuming the volume Performance class and call expandAndRecover to update the volume Performance parameters.
13451343

1346-
1347-
1348-
1349-
1350-
#### CreateVolume
1351-
1352-
For creating volume, there are two different ways to configure the related parameters. Only **cluster administrators** should be able to create StorageClass and/or VolumeAttributesClass.
1353-
1354-
1355-
1356-
* From storage class parameters(existing today):
1357-
1358-
```
1359-
apiVersion: storage.k8s.io/v1
1360-
kind: StorageClass
1361-
metadata:
1362-
name: csi-sc-example
1363-
provisioner: pd.csi.storage.gke.io
1364-
parameters:
1365-
...
1366-
provisioned-iops-on-create: '10000'
1367-
provisioned-throughput-on-create: '100MiB/s'
1368-
volumeBindingMode: WaitForFirstConsumer
1369-
```
1370-
1371-
* From VolumeAttributesClass(from this KEP)
1372-
1373-
```
1374-
apiVersion: storage.k8s.io/v1alpha1
1375-
kind: VolumeAttributesClass
1376-
driverName: pd.csi.storage.gke.io
1377-
metadata:
1378-
name: silver
1379-
parameters:
1380-
iops: "500"
1381-
throughput: "50MiB/s"
1382-
```
1383-
1384-
```
1385-
apiVersion: storage.k8s.io/v1
1386-
kind: StorageClass
1387-
metadata:
1388-
name: csi-gcepd
1389-
provisioner: pd.csi.storage.gke.io
1390-
volumeBindingMode: WaitForFirstConsumer
1391-
```
1392-
1393-
The driver is responsible for parsing and validating these parameters and making sure duplicate configuration is not allowed. End users will specify the VolumeAttributesClass in the PVC object:
1394-
1395-
```
1396-
apiVersion: v1
1397-
kind: PersistentVolumeClaim
1398-
metadata:
1399-
name: test-pv-claim
1400-
spec:
1401-
storageClassName: csi-sc-example
1402-
VolumeAttributesClassName: silver
1403-
accessModes:
1404-
- ReadWriteOnce
1405-
resources:
1406-
requests:
1407-
storage: 64Gi
1408-
```
1409-
1410-
#### ModifyVolume
1411-
1412-
![VolumeAttributesClass Batch Update](./VolumeAttributesClass-BatchUpdate.png)
1413-
1414-
Since VolumeAttributesClass is **immutable**, to update the performance parameters, the end user can modify the PVC object to set a different VolumeAttributesClass. If the existing VolumeAttributesClass cannot satisfy the end user’s use case, the end user needs to contact the cluster administrator to create a new VolumeAttributesClass.
1415-
1416-
**Watching changes in the PVC object**, if the VolumeAttributesClass changes, it will trigger a ModifyVolume call.
1417-
1418-
```
1419-
apiVersion: storage.k8s.io/v1alpha1
1420-
kind: VolumeAttributesClass
1421-
metadata:
1422-
name: gold
1423-
parameters:
1424-
iops: "1000"
1425-
throughput: "100MiB/s"
1426-
```
1427-
1428-
```
1429-
apiVersion: v1
1430-
kind: PersistentVolumeClaim
1431-
metadata:
1432-
name: test-pv-claim
1433-
spec:
1434-
storageClassName: csi-sc-example
1435-
VolumeAttributesClassName: gold
1436-
accessModes:
1437-
- ReadWriteOnce
1438-
resources:
1439-
requests:
1440-
storage: 64Gi
1441-
```
1442-
1443-
Under the modify volume call, it will pass in the `VolumeAttributesClass `object and do the update operation based on the `VolumeAttributesClass` parameters.
1444-
1445-
##### Pros:
1344+
#### Pros:
14461345

14471346
* Provide an automation of updating all PVCs with the new set of performance related parameters
14481347

14491348

1450-
##### Cons:
1349+
#### Cons:
14511350

14521351
* Unknown scaling problems for clusters with large numbers of volumes
14531352
* Partial update failures are difficult to communicate with the overall system

0 commit comments

Comments
 (0)