ccremer / kubernetes-zfs-provisioner

Dynamic ZFS persistent volume provisioner for Kubernetes
Apache License 2.0
74 stars 7 forks source link

Resizing PVC #78

Closed realSaltyFish closed 11 months ago

realSaltyFish commented 2 years ago

It seems that this provisioner currently does not support resizing existing PVC's. Would you consider adding support for that?

Error: UPGRADE FAILED: cannot patch "test-service" with kind PersistentVolumeClaim: persistentvolumeclaims "test-service" is forbidden: only dynamically provisioned pvc can be resized and the storageclass that provisions the pvc must support resize

ccremer commented 2 years ago

Hi. I'm actually not even sure if that's supported by the library used, https://github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/ I couldn't find out if the Interface I have to implement, calls Provision when resizing the volume, the controller would have to watch each PVC and I don't think it does that. This issue here https://github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/issues/43 also talks about volume expansion, and if the featureset hasn't changed in the meantime regarding resizing, it doesn't look like resizing is an option.

I would have to do some tests to verify that (or you could do it on your own by creating a storageclass that fakes resizing support), but I probably don't have time the next few weeks.

wtayyeb commented 11 months ago

Hi @ccremer , any update on this issue? There is another zfs provisioner (https://github.com/openebs/zfs-localpv/) that do expansion, but have no NFS sharing. I think you could look at their repo and figure out how to implement the expansion.

ccremer commented 11 months ago

Hi @wtayyeb No, nothing new on this issue I'm afraid. zfs-localpv is implemented using CSI, this provisioner isn't as it was created before CSI was a thing.

If you don't mind, I'm actually closing this issue. I personally don't have the need for resizing, so I'm not going to spend my spare time into something I don't need. I'm happy to review and accept PRs if anyone is contributing though.