diff --git a/keps/sig-apps/0034-20181220-statefulset-volume-expansion.md b/keps/sig-apps/0034-20181220-statefulset-volume-expansion.md index 1c6e7b5feb0e..9bda6c3b5b02 100644 --- a/keps/sig-apps/0034-20181220-statefulset-volume-expansion.md +++ b/keps/sig-apps/0034-20181220-statefulset-volume-expansion.md @@ -13,7 +13,7 @@ approvers: - TBD editor: TBD creation-date: 2018-12-20 -last-updated: 2018-12-20 +last-updated: 2018-12-22 status: provisional see-also: - n/a @@ -65,17 +65,19 @@ Allow for increases to storage requests in the `volumeClaimTemplates` component The apiserver will allow for increases to storage requests in the `volumeClaimTemplates` component of a StatefulSet. -During the StatefulSet update process, the StatefulSet controller will detect an update to a `volumeClaimTemplate` by comparing the updated and current revision of the StatefulSet. +During the StatefulSet update process, the StatefulSet controller will detect an update to a `volumeClaimTemplate` by comparing the updated and current revision of the StatefulSet. This requires the `VolumeClaimTemplates` component of the StatefulSet to be recorded in the StatefulSet's `ControllerRevision` object. While updating a pod, the StatefulSet controller will update a referenced persistent volume claim object if its storage request in the associated `volumeClaimTemplate` has been increased. -The pod will be restarted after the `FileSystemResizePending` condition is True on all updated persistent volume claims it references. +The Statefulset controller will delete and recreate the pod after the `FileSystemResizePending` condition is True on all updated persistent volume claims it references. However, if the `ExpandInUsePersistentVolumes` feature is enabled, then deleting the pod is unnecessary to complete file system expansion on updated persistent volumes. -### Risks and Mitigations +The functionality provided by this enhancement will be gated by the `StatefulSetVolumeExpansion` feature gate. -Under the `ExpandPersistentVolumes` feature, pods referencing a volume must be restarted for file system expansion to occur after the `FileSystemResizePending` condition is True on the persistent volume claim. If the StatefulSet is configured with the `RollingUpdate` update strategy, then the StatefulSet controller would need to wait for the `FileSystemResizePending` condition to be satisfied on each persistent volume claim referenced by the pod it is updating before restarting the pod. This could noticeably increase the update time of a StatefulSet with many replicas. +### Risks and Mitigations+ -A potential mitigation would be the eventual adoption of the `ExpandInUsePersistentVolumes` alpha feature in Kubernetes v1.11 which enables file system expansion on volumes being used by a pod. +If the `ExpandInUsePersistentVolumes` alpha feature in Kubernetes v1.11 is not enabled when expanding a volume, then pods referencing the volume must be deleted and recreated for file system expansion to occur after the `FileSystemResizePending` condition is True on the persistent volume claim. If the StatefulSet is configured with the `RollingUpdate` update strategy, then the StatefulSet controller would need to wait for the `FileSystemResizePending` condition to be satisfied on each persistent volume claim referenced by the pod it is updating before restarting the pod. This could noticeably increase the update time of a StatefulSet with many replicas. + +A potential mitigation would be the eventual adoption of the `ExpandInUsePersistentVolumes` feature, which enables file system expansion on in-use volumes thus, making it unecessary to delete and recreate any refrencing pods during volume expansion. ## Graduation Criteria