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

PVC created by storageclass does not support capacity expansion #121

Open
limityu opened this issue Jun 17, 2024 · 2 comments
Open

PVC created by storageclass does not support capacity expansion #121

limityu opened this issue Jun 17, 2024 · 2 comments

Comments

@limityu
Copy link

limityu commented Jun 17, 2024

---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: minio
provisioner: ru.yandex.s3.csi
parameters:
  mounter: geesefs
  # you can set mount options here, for example limit memory cache size (recommended)
  options: "--memory-limit 1000 --dir-mode 0777 --file-mode 0666 -o allow_other --uid 999 --gid 999"
  # to use an existing bucket, specify it here:
  bucket: stk-k8s-pvc
  csi.storage.k8s.io/provisioner-secret-name: csi-s3-secret
  csi.storage.k8s.io/provisioner-secret-namespace: kube-system
  csi.storage.k8s.io/controller-publish-secret-name: csi-s3-secret
  csi.storage.k8s.io/controller-publish-secret-namespace: kube-system
  csi.storage.k8s.io/node-stage-secret-name: csi-s3-secret
  csi.storage.k8s.io/node-stage-secret-namespace: kube-system
  csi.storage.k8s.io/node-publish-secret-name: csi-s3-secret
  csi.storage.k8s.io/node-publish-secret-namespace: kube-system
allowVolumeExpansion: true 

After changing the PVC size and checking the PVC status, it is prompted that the plugin is not supported

kubectl -n test describe pvc pvc-minio-10g 
Name:          pvc-minio-10g
Namespace:     test
StorageClass:  minio
Status:        Bound
Volume:        pvc-282bc831-6da5-4fa0-8681-c4ffcf9918ef
Labels:        <none>
Annotations:   pv.kubernetes.io/bind-completed: yes
               pv.kubernetes.io/bound-by-controller: yes
               volume.beta.kubernetes.io/storage-provisioner: ru.yandex.s3.csi
               volume.kubernetes.io/storage-provisioner: ru.yandex.s3.csi
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      10Gi
Access Modes:  RWO
VolumeMode:    Filesystem
Used By:       mysql-deployment-859b9756fb-trwbh
Events:
  Type     Reason                 Age                    From                                                                        Message
  ----     ------                 ----                   ----                                                                        -------
  Normal   ExternalProvisioning   6m35s                  persistentvolume-controller                                                 waiting for a volume to be created, either by external provisioner "ru.yandex.s3.csi" or manually created by system administrator
  Normal   Provisioning           6m35s                  ru.yandex.s3.csi_csi-provisioner-s3-0_be8d3327-aa08-49e2-980e-02f83f936bb7  External provisioner is provisioning volume for claim "test/pvc-minio-10g"  Normal   ProvisioningSucceeded  6m35s                  ru.yandex.s3.csi_csi-provisioner-s3-0_be8d3327-aa08-49e2-980e-02f83f936bb7  Successfully provisioned volume pvc-282bc831-6da5-4fa0-8681-c4ffcf9918ef
  Warning  ExternalExpanding      4m10s (x2 over 6m17s)  volume_expand                                                               Ignoring the PVC: didn't find a plugin capable of expanding the volume; waiting for an external controller to process this PVC.

Check the relevant documents, the CSI controller needs to have the EXPAND_VOLUME capability. Is it supported or how to enable this function?

@vherrlein
Copy link

+1 for being for accurate, it would be even more intersting to associate the volume requested size alligned with the S3 Bucket Quota and automatically managed by implementing the expand_volume (online / offline) capability.

In the meantime, from the kubernetes side, it can be managed with the external-resizer.
Deploying volume expansion functionality
CSI external-resizer

@limityu
Copy link
Author

limityu commented Aug 5, 2024

+1 for being for accurate, it would be even more intersting to associate the volume requested size alligned with the S3 Bucket Quota and automatically managed by implementing the expand_volume (online / offline) capability.

In the meantime, from the kubernetes side, it can be managed with the external-resizer. Deploying volume expansion functionality CSI external-resizer

According to the instructions in https://github.com/kubernetes-csi/external-resizer, deploy deploy/kubernetes/rbac.yaml and deploy/kubernetes/deployment.yaml and then jump to PV and the following prompt appears

I0805 05:47:02.406147       1 leaderelection.go:281] successfully renewed lease kube-system/external-resizer-io-kubernetes-storage-mock
I0805 05:47:05.093922       1 controller.go:284] "Started PVC processing for resize controller" key="default/example-pvc"
I0805 05:47:05.094010       1 csi_resizer.go:120] "Skip resize PV" PV="pvc-030a311e-9f56-48db-aed3-c5604cfbc471" resizer="ru.yandex.s3.csi"
I0805 05:47:05.094023       1 controller.go:366] "Resizer doesn't support PV" controller="io.kubernetes.storage.mock" PV="pvc-030a311e-9f56-48db-aed3-c5604cfbc471"
I0805 05:47:05.094030       1 controller.go:341] "No need to resize PV" PV="pvc-030a311e-9f56-48db-aed3-c5604cfbc471"
I0805 05:47:07.412025       1 leaderelection.go:281] successfully renewed lease kube-system/external-resizer-io-kubernetes-storage-mock
I0805 05:47:12.418410       1 leaderelection.go:281] successfully renewed lease kube-system/external-resizer-io-kubernetes-storage-mock
I0805 05:47:17.423220       1 leaderelection.go:281] successfully renewed lease kube-system/external-resizer-io-kubernetes-storage-mock
I0805 05:47:22.429880       1 leaderelection.go:281] successfully renewed lease kube-system/external-resizer-io-kubernetes-storage-mock
I0805 05:47:27.434944       1 leaderelection.go:281] successfully renewed lease kube-system/external-resizer-io-kubernetes-storage-mock
I0805 05:47:32.363980       1 reflector.go:808] k8s.io/client-go/informers/factory.go:160: Watch close - *v1.PersistentVolume total 11 items received
I0805 05:47:32.439585       1 leaderelection.go:281] successfully renewed lease kube-system/external-resizer-io-kubernetes-storage-mock
I0805 05:47:37.445906       1 leaderelection.go:281] successfully renewed lease kube-system/external-resizer-io-kubernetes-storage-mock

The key field is Resizer does not support PV" controller="io.kubernetes.storage.mock" PV="pvc-030a311e-9f56-48db-aed3-c5604cfbc471. Unfortunately, it does not seem to be supported.

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

No branches or pull requests

2 participants