Skip to content
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

[feature request] support pvc update when volumeClaimTemplates storage size changed in cloneset #1670

Open
basuotian opened this issue Jul 24, 2024 · 3 comments
Assignees

Comments

@basuotian
Copy link

What would you like to be added:

We are using csi ephemeral volumes in cloneset with some csi implement support VolumeExpansion, the cloneset like

apiVersion: apps.kruise.io/v1alpha1
kind: CloneSet
metadata:
  name: my-hello-world
  namespace: default
spec:
  // ...
  updateStrategy:
    type: InPlaceIfPossible
  volumeClaimTemplates:
  - metadata:
      name: data-dir
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 40Gi // from 30Gi patch to 40Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
   // ...
  name: data-dir-my-hello-world-gv7w7
  // ...
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 30Gi  // need to be patched
  // ...
status:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 30Gi
  phase: Bound

When we update storage from 30Gi to 40Gi, the cloneset is updated but pvc still requests 30Gi,
looks like kruise controller dose not patch pvc as the latest volumeClaimTemplate.

Finally we have to patch pvc manually to improve volume resize, we think pvc shoule be patched by kruise as the volumeClaimTemplate updated in cloneset

Why is this needed:

@Colvin-Y
Copy link
Contributor

@basuotian repeat, see #905

@ABNER-1
Copy link
Member

ABNER-1 commented Jul 25, 2024

@basuotian
A feature has been merged into master. #1536 "When CloneSet volumeClaimTemplates changed, Pod must ReCreate update. Then new PVC will be created from newest template. "
I think this feature can help you.

@basuotian
Copy link
Author

@basuotian A feature has been merged into master. #1536 "When CloneSet volumeClaimTemplates changed, Pod must ReCreate update. Then new PVC will be created from newest template. " I think this feature can help you.

thanks, but in my case, recreate update is unnecessary, my csi implement support VolumeExpansion so i can in-place resize the pvc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants