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
@@ -74,8 +77,7 @@ the user is using less storage than he/she actually is.
74
77
To solve this problem - we propose that although users are allowed to reduce size of their
75
78
PVC (as long as requested size >= `pvc.Status.Capacity`), quota calculation
76
79
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.
79
81
80
82
### Goals
81
83
@@ -108,14 +110,15 @@ When user reduces `pvc.Spec.Resources`, expansion-controller will set `pvc.Statu
108
110
109
111
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.
110
112
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
112
114
115
+
#### User flow stories
113
116
114
117
##### Case 0 (default PVC creation):
115
118
- User creates a 10Gi PVC by setting - `pvc.spec.resources.requests["storage"] = "10Gi"`.
116
119
- API server sets `pvc.Status.AllocatedResources` to "10Gi" on creation.
117
120
118
-
######Case 1 (controller+node expandable):
121
+
##### Case 1 (controller+node expandable):
119
122
- User increases 10Gi PVC to 100Gi by changing - `pvc.spec.resources.requests["storage"] = "100Gi"`.
120
123
-`pvc.Status.AllocatedResources` still reports `10Gi`.
121
124
- 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
129
132
- Quota controller sees a reduction in used quota because `max(pvc.Spec.Resources, pvc.Status.AllocatedResources)` is 20Gi.
130
133
- Expansion succeeds and `pvc.Status.Capacity` and `pv.Spec.Capacity` report new size as `20Gi`.
131
134
132
-
######Case 2 (controller+node expandable with no GET_VOLUME capability):
135
+
##### Case 2 (controller+node expandable with no GET_VOLUME capability):
133
136
- User increases 10Gi PVC to 100Gi by changing - `pvc.spec.resources.requests["storage"] = "100Gi"`
134
137
-`pvc.Status.AllocatedResources` still reports `10Gi`.
135
138
- 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
143
146
- Expansion succeeds and `pvc.Status.Capacity` and `pv.Spec.Capacity` report new size as `20Gi`.
- User increases 10Gi PVC to 100Gi by changing `pvc.spec.resources.requests["storage"] = "100Gi"`
148
151
-`pvc.Status.AllocatedResources` still reports `10Gi`.
149
152
- 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
160
163
## Graduation Criteria
161
164
162
165
**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.
0 commit comments