What will happen if the dynamic provisioned PersistentVolume create failed?

12/28/2019

In my scenarios, I designed a admission webhook to admit PersistentVolume create event, and normally these dynamic created PVs are provisioned by CSI controller. I know that PersistentVolume is a cluster-level object and it will be bound to some specific tenant by label. But I've got a question that what if CSI controller apply a cloud disk successfully from a backend provisioner, but when this PV object try to create, it reject by admission webhook, will the api-server automatically call Delete method of CSI controller and release this piece of cloud disk? Or this cloud disk will be leaked ?

-- SimonCqk
cloud-storage
kubernetes
persistent-volumes

0 Answers