@@ -112,6 +112,7 @@ tags, and then generate with `hack/update-toc.sh`.
112
112
- [ Support for automatically skip not managed PVCs] ( #support-for-automatically-skip-not-managed-pvcs )
113
113
- [ Reconcile all PVCs regardless of Pod revision labels] ( #reconcile-all-pvcs-regardless-of-pod-revision-labels )
114
114
- [ Treat all incompatible PVCs as unavailable replicas] ( #treat-all-incompatible-pvcs-as-unavailable-replicas )
115
+ - [ Integrate with RecoverVolumeExpansionFailure feature] ( #integrate-with-recovervolumeexpansionfailure-feature )
115
116
- [ Infrastructure Needed (Optional)] ( #infrastructure-needed-optional )
116
117
<!-- /toc -->
117
118
@@ -295,10 +296,8 @@ Before creating a new Pod, or, if the Pod template is not changed, updating the
295
296
use server-side apply to update the PVCs used by the Pod.
296
297
297
298
The patch used in server-side apply is the volumeClaimTemplates in the StatefulSet, except:
298
- * ` spec.resources.requests.storage ` is set to max(template ` spec.resources.requests.storage ` , PVC ` status.capacity.storage ` ),
299
- so that we will not decrease the storage size below its current status.
300
- Note that we still may decrease the size in PVC spec,
301
- which can help recover from a failed expansion if ` RecoverVolumeExpansionFailure ` feature gate is enabled.
299
+ * ` spec.resources.requests.storage ` is set to max(template ` spec.resources.requests.storage ` , PVC ` spec.resources.requests.storage ` ),
300
+ so that we will never decrease the storage size.
302
301
* ` controller-revision-hash ` label is added to the PVCs.
303
302
304
303
Naturally, most of the update control logic also applies to PVCs.
@@ -1232,6 +1231,16 @@ and all operations are blocked.
1232
1231
1233
1232
[ KEP-0661 ] : https://github.com/kubernetes/enhancements/pull/3412
1234
1233
1234
+ ### Integrate with RecoverVolumeExpansionFailure feature
1235
+
1236
+ We may decrease the size in PVC spec automatically to help recover from a failed expansion
1237
+ if ` RecoverVolumeExpansionFailure ` feature gate is enabled.
1238
+ However, when reducing the spec size of PVC, it must still be greater than its status (not equal to).
1239
+ So we don't know what to set if ` volumeClaimTemplates ` is smaller than PVC status.
1240
+
1241
+ User can still update PVC manually.
1242
+
1243
+
1235
1244
## Infrastructure Needed (Optional)
1236
1245
1237
1246
<!--
0 commit comments