Skip to content

Commit 5ffb4e3

Browse files
committed
Fix PRR sections and review comments
1 parent f70342e commit 5ffb4e3

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

keps/sig-storage/1790-recover-resize-failure/README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
- [Implementation](#implementation)
1313
- [User flow stories](#user-flow-stories)
1414
- [Case 0 (default PVC creation):](#case-0-default-pvc-creation)
15+
- [Case 1 (controller+node expandable):](#case-1-controllernode-expandable)
16+
- [Case 2 (controller+node expandable with no GET_VOLUME capability):](#case-2-controllernode-expandable-with-no-get_volume-capability)
17+
- [Case 3 (Malicious user)](#case-3-malicious-user)
1518
- [Risks and Mitigations](#risks-and-mitigations)
1619
- [Graduation Criteria](#graduation-criteria)
1720
- [Test Plan](#test-plan)
@@ -74,8 +77,7 @@ the user is using less storage than he/she actually is.
7477
To solve this problem - we propose that although users are allowed to reduce size of their
7578
PVC (as long as requested size >= `pvc.Status.Capacity`), quota calculation
7679
will use `max(pvc.Spec.Capacity, pvc.Status.AllocatedResources)` and reduction in `pvc.Status.AllocatedResources`
77-
is only done by resize-controller after verifying volume size using `GET_VOLUME` csi RPC call.
78-
80+
is only done by resize-controller after verifying volume size using `ControllerGetVolume` csi RPC call.
7981

8082
### Goals
8183

@@ -108,14 +110,15 @@ When user reduces `pvc.Spec.Resources`, expansion-controller will set `pvc.Statu
108110

109111
If CSI driver does not have `GET_VOLUME` controller capability and `pvc.Spec.Resources` < `pvc.Status.AllocatedResources` (i.e user is attempting to reduce size of a volume that expansion controller previously tried to expand) - then although expansion-controller will try volume expansion with value in `pvc.Spec.Resources` - it will not reduce reported value in `pvc.Status.AllocatedResources`, which will result in no quota being restored to the user. In other words - for CSI drivers that don't have `GET_VOLUME` controller capability - `pvc.Status.AllocatedResources` will report highest requested value and reducing `pvc.Spec.Resources` will not result in reduction of used quota.
110112

111-
#### User flow stories
113+
*Note:* This proposal expects that users can not modify `pvc.Status` directly and cheat quota system. In general this should be fine because users should not have access to edit status of almost anything. Link to discussion on slack - https://kubernetes.slack.com/archives/CJUQN3E4T/p1620059624022100
112114

115+
#### User flow stories
113116

114117
##### Case 0 (default PVC creation):
115118
- User creates a 10Gi PVC by setting - `pvc.spec.resources.requests["storage"] = "10Gi"`.
116119
- API server sets `pvc.Status.AllocatedResources` to "10Gi" on creation.
117120

118-
###### Case 1 (controller+node expandable):
121+
##### Case 1 (controller+node expandable):
119122
- User increases 10Gi PVC to 100Gi by changing - `pvc.spec.resources.requests["storage"] = "100Gi"`.
120123
- `pvc.Status.AllocatedResources` still reports `10Gi`.
121124
- Quota controller uses `max(pvc.Status.AllocatedResources, pvc.Spec.Resources)` and adds `90Gi` to used quota.
@@ -129,7 +132,7 @@ If CSI driver does not have `GET_VOLUME` controller capability and `pvc.Spec.Res
129132
- Quota controller sees a reduction in used quota because `max(pvc.Spec.Resources, pvc.Status.AllocatedResources)` is 20Gi.
130133
- Expansion succeeds and `pvc.Status.Capacity` and `pv.Spec.Capacity` report new size as `20Gi`.
131134

132-
###### Case 2 (controller+node expandable with no GET_VOLUME capability):
135+
##### Case 2 (controller+node expandable with no GET_VOLUME capability):
133136
- User increases 10Gi PVC to 100Gi by changing - `pvc.spec.resources.requests["storage"] = "100Gi"`
134137
- `pvc.Status.AllocatedResources` still reports `10Gi`.
135138
- Quota controller uses `max(pvc.Status.AllocatedResources, pvc.Spec.Resources)` and adds `90Gi` to used quota.
@@ -143,7 +146,7 @@ If CSI driver does not have `GET_VOLUME` controller capability and `pvc.Spec.Res
143146
- Expansion succeeds and `pvc.Status.Capacity` and `pv.Spec.Capacity` report new size as `20Gi`.
144147
- `pvc.Status.AllocatedResources` however keeps reporting `100Gi`.
145148

146-
###### Case 3 (Malicious user)
149+
##### Case 3 (Malicious user)
147150
- User increases 10Gi PVC to 100Gi by changing `pvc.spec.resources.requests["storage"] = "100Gi"`
148151
- `pvc.Status.AllocatedResources` still reports `10Gi`.
149152
- Quota controller uses `max(pvc.Status.AllocatedResources, pvc.Spec.Resources)` and adds `90Gi` to used quota.
@@ -160,8 +163,8 @@ If CSI driver does not have `GET_VOLUME` controller capability and `pvc.Spec.Res
160163
## Graduation Criteria
161164

162165
* *Alpha* in 1.22 behind `RecoverExpansionFailure` feature gate with set to a default of `false`. The limitation about quota and CSI capability should be clearly documented.
163-
* *Beta* in 1.23: Since this feature is part of general `ExpandPersistentVolumes` feature which is in beta, we are going to move this to beta with confirmed production usage.
164-
* *GA* in 1.24 along with `ExpandPersistentvolumes` feature. The list of issues for volume expansion going GA can be found at - https://github.com/orgs/kubernetes-csi/projects/12.
166+
* *Beta* in 1.23: Since this feature is part of general `ExpandPersistentVolumes` feature which is in beta, we are going to move this to beta with enhanced e2e and more stability improvements.
167+
* *GA* in 1.25 along with `ExpandPersistentvolumes` feature. The list of issues for volume expansion going GA can be found at - https://github.com/orgs/kubernetes-csi/projects/12.
165168

166169
### Test Plan
167170

keps/sig-storage/1790-recover-resize-failure/kep.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ see-also:
2121
replaces:
2222
superseded-by:
2323

24-
latest-milestone: "v1.19"
24+
latest-milestone: "v1.22"
2525
stage: "alpha"
2626
milestone:
27-
alpha: "v1.19"
28-
beta: "v1.20"
29-
stable: "v1.21"
27+
alpha: "v1.22"
28+
beta: "v1.23"
29+
stable: "v1.25"
3030
feature-gates:
3131
- name: RecoverExpansionFailure
3232
components:

0 commit comments

Comments
 (0)