-
Notifications
You must be signed in to change notification settings - Fork 1
PVC Autoscaler: PoC to automate downscaling of PersistentVolumeClaims #33
Copy link
Copy link
Open
Labels
area/auto-scalingAuto-scaling (CA/HPA/VPA/HVPA, predominantly control plane, but also otherwise) relatedAuto-scaling (CA/HPA/VPA/HVPA, predominantly control plane, but also otherwise) relatedarea/storageStorage relatedStorage relatedkind/enhancementEnhancement, improvement, extensionEnhancement, improvement, extensionkind/pocProof of concept or prototypeProof of concept or prototypelifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.teamsize/mediumA team of 3 people.A team of 3 people.
Metadata
Metadata
Assignees
Labels
area/auto-scalingAuto-scaling (CA/HPA/VPA/HVPA, predominantly control plane, but also otherwise) relatedAuto-scaling (CA/HPA/VPA/HVPA, predominantly control plane, but also otherwise) relatedarea/storageStorage relatedStorage relatedkind/enhancementEnhancement, improvement, extensionEnhancement, improvement, extensionkind/pocProof of concept or prototypeProof of concept or prototypelifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.teamsize/mediumA team of 3 people.A team of 3 people.
Type
Fields
Give feedbackNo fields configured for issues without a type.
How to categorize this topic?
/area storage
/area auto-scaling
/kind enhancement
/kind poc
/label teamsize/medium
What is the topic about?:
GEP-0038: Autoscaling PersistentVolumeClaims proposes changes to the
pvc-autoscalercontroller and how it will be used in Gardener runtime andSeedclusters to scale up observability components. Downscaling is listed as a non-goal because it is a complex and risky operation and its research and implementation would delay the immediate value of scaling up PVCs from a smaller starting size for new clusters.However, support for downscaling is a potential future enhancement that can be added after the implementation of GEP-0038 is complete.
The goal of this task would be dig deeper into how PVCs can be downscaled and how the operation can be automated reliably - risk of data loss removed and downtime reduced as much as possible.
As there is no native way to downscale volumes in k8s, one way to achieve it is with the following steps:
PersistentVolume'spersistentVolumeReclaimPolicyis changed to Retain.volumeNamepointing to the smallerPersistentVolume.claimRefin thePersistentVolumeis edited to point to the PVC from the previous step.Note that
VolumeSnapshotscannot be used, because PVCs cannot be created with a smaller size than the one which was used to create theVolumeSnapshot.The implementation to downscale PVCs could be done in a new controller introduced to the
pvc-autoscaler.