You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Option 1: First class only Iops and throughput](#option-1-first-class-only-iops-and-throughput)
64
64
-[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)
76
74
-[Appendix - Current SPs Case Study](#appendix---current-sps-case-study)
@@ -129,7 +127,7 @@ Currently after CreateVolume with provider specific parameters pass in storage c
129
127
## Proposal
130
128
131
129
### 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).
133
131
134
132
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.
135
133
@@ -1122,7 +1120,7 @@ requests:
1122
1120
Add PVC Status field; change ResizeStatus alpha field to AllocatedResourceStatus map.
1123
1121
1124
1122
1125
-
#####CSI API
1123
+
#### CSI API
1126
1124
1127
1125
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:
1128
1126
@@ -1255,18 +1253,18 @@ IO provisioning should have similar issues to resize (except that we have to sol
1255
1253
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.
1256
1254
1257
1255
1258
-
#####Pros:
1256
+
#### Pros:
1259
1257
1260
1258
* Simplify user experience by giving only restricted, well defined controls
1261
1259
1262
-
#####Cons:
1260
+
#### Cons:
1263
1261
1264
1262
1265
1263
* Difficult to get consensus of what is iops/throughput among different storage providers
1266
1264
* Not all the storage providers support independently configurable iops/throughput
1267
1265
1268
1266
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
1270
1268
1271
1269
The users will set the volume performance parameters directly in the PVC:
* More flexibility to end users and no cluster administrator needs to be involved(also a con)
1312
1310
1313
1311
1314
-
#####Cons:
1312
+
#### Cons:
1315
1313
1316
1314
* 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.
1317
1315
* Not portable across different cloud providers.
1318
1316
1319
1317
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.
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.
1345
1343
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:
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:
1446
1345
1447
1346
* Provide an automation of updating all PVCs with the new set of performance related parameters
1448
1347
1449
1348
1450
-
#####Cons:
1349
+
#### Cons:
1451
1350
1452
1351
* Unknown scaling problems for clusters with large numbers of volumes
1453
1352
* Partial update failures are difficult to communicate with the overall system
0 commit comments