Skip to content

Commit 299a81d

Browse files
committed
Allow shrinking only to a value greater than pvc.Status
1 parent 46c2ee1 commit 299a81d

File tree

1 file changed

+2
-2
lines changed
  • keps/sig-storage/1790-recover-resize-failure

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ shrink on underlying volume, but it can fool the quota system in believing
7575
the user is using less storage than he/she actually is.
7676

7777
To solve this problem - we propose that although users are allowed to reduce size of their
78-
PVC (as long as requested size >= `pvc.Status.Capacity`), quota calculation
78+
PVC (as long as requested size > `pvc.Status.Capacity`), quota calculation
7979
will use `max(pvc.Spec.Capacity, pvc.Status.AllocatedResources)` and reduction in `pvc.Status.AllocatedResources`
8080
is only done by resize-controller after verifying volume size using `ControllerGetVolume` csi RPC call.
8181

@@ -92,7 +92,7 @@ is only done by resize-controller after verifying volume size using `ControllerG
9292

9393
As part of this proposal, we are mainly proposing three changes:
9494

95-
1. Relax API validation on PVC update so as reducing `pvc.Spec.Resoures` is allowed, as long as requested size is `>=pvc.Status.Capacity`.
95+
1. Relax API validation on PVC update so as reducing `pvc.Spec.Resoures` is allowed, as long as requested size is `>pvc.Status.Capacity`.
9696
2. Add a new field in PVC API called - `pvc.Status.AllocatedResources` for the purpose of tracking used storage size. By default only api-server or resize-controller can set this field.
9797
3. Update quota code to use `max(pvc.Spec.Resources, pvc.Status.AllocatedResources)` when evaluating usage for PVC.
9898

0 commit comments

Comments
 (0)