How to handle K8s PVC resize in controller?

4/25/2019

I've just implemented an external PV provision controller for K8s using interfaces provided by sig-storage-lib-external-provisioner. Now I can dynamic-provision PVs for any PVCs under my specific SC. But how do I handle volume expansions?

I'm guessing that one way to do it is to extend sig-storage-lib-external-provisioner's interface to further support volume expansion functionality. I may need to add some code to handle PVC updates and take differences between requested capacity and current capacity as expansion operations. Would this be a proper way to do this? Or maybe there's another "well-known" way for this?

-- fengye87
kubernetes

0 Answers