gluster / gluster-kubernetes

GlusterFS Native Storage Service for Kubernetes
Apache License 2.0
875 stars 389 forks source link

Gluster volume not deleted if StorageClass uses Reclaim Policy "Retain" #600

Closed Retrospector closed 5 years ago

Retrospector commented 5 years ago

Hi, I noticed this while searching for the reason why Heketi is not deleting the Gluster volumes after the PV is deleted in Kubernetes. The "Retain" Reclaim Policy should keep the PV around after the PVClaim is deleted. But when I then manually delete the Released PV, the backing Gluster volume stays. I'd expected that Heketi would delete the Volume if a released PV is maually deleted.

Is this expected behavior? Thanks in advance for your assistance.

phlogistonjohn commented 5 years ago

Heketi has to be "told" to delete a volume and that happens within the provisioner. If the provisioner does not send a delete api request to heketi when the PV is deleted without a PVC present then this sounds like the behavior I'd expect. That makes sense because the PVC is what links the PV to the provisioning mechanism.

I somewhat doubt this can be changed but if you want to discuss it further that would probably be best upstream in kubernetes where the provisioner is implemented.

Retrospector commented 5 years ago

So, a lack of knowledge about kubernetes on my part. Thank you, I appreaciate the quick response.