-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch PVC when storage request is increased #3004
Comments
I think we can patch the PVC automatically, and users have to make sure that the underlying sc supports expansion. |
SGTM |
related discussions: |
Current statefulset implementation does not allow recreate the statefulset, patch the PVCspatch the PVCs only |
My intent with the feature request is to just patch the PVCs. I think that is sufficient. |
hi, @mightyguava what volume plugin are you using? does it support online filesystem volume expansion? |
We are using the in-tree aws EBS driver. I believe it require the pod to be restarted for the resize operation to run. It’s ok to patch all PVCs at the same time but the stateful set still needs a rolling restart. |
Thanks! I didn't test with EKS. But according to this blog, as for AWS-EBS, the pod does not need to be restarted. The feature If |
We just upgraded to kubernetes 1.15 last week so I guess it’s on by default now! I will test it today. |
Just tried on our cluster, it didn't resize online. PVC
storage class``` allowVolumeExpansion: true apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"allowVolumeExpansion":true,"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{},"name":"ebs-gp2"},"parameters":{"fsType":"ext4","type":"gp2"},"provisioner":"kubernetes.io/aws-ebs","reclaimPolicy":"Retain","volumeBindingMode":"WaitForFirstConsumer"} creationTimestamp: "2019-11-07T16:48:26Z" name: ebs-gp2 resourceVersion: "536533776" selfLink: /apis/storage.k8s.io/v1/storageclasses/ebs-gp2 uid: 6b3226b1-017e-11ea-a332-0695703b250c parameters: fsType: ext4 type: gp2 provisioner: kubernetes.io/aws-ebs reclaimPolicy: Retain volumeBindingMode: WaitForFirstConsumer ```I've confirmed that we are on kubernetes 1.15, and this is the only feature gate on the kubelet:
|
Huh, never mind, it did end up finish resizing automatically without a pod restart. I tried it manually by patching all 3 TiKV pods. They all did the resize of the volume immediately via AWS API, and then all went into the status
|
Great! |
Feature Request
Is your feature request related to a problem? Please describe:
Increasing storage for tidb, pd, pump, monitor, require the user to manually patch PVCs. The
storage
setting in the CRDs only have effect when initially creating the cluster.Describe the feature you'd like:
When the
storage
request for any component is increased, and the underlying storage-class supports expansion (allowVolumeExpansion: true
), the operator should patch the PVC to increase the volume size automatically.The text was updated successfully, but these errors were encountered: