Skip to content

Commit

Permalink
git
Browse files Browse the repository at this point in the history
  • Loading branch information
SidakM committed Dec 22, 2018
1 parent 623cceb commit 8920739
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions keps/sig-apps/0034-20181220-statefulset-volume-expansion.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 8920739

Please sign in to comment.