Fixing issue 2266
When PolicyClaim is Delete the pv are not removed. Instead of this they stay as Available.
I've modified the sync_volumes.go to add this
// Check if the PV has ReclaimPolicy "Delete".
if pv.Spec.PersistentVolumeReclaimPolicy == corev1.PersistentVolumeReclaimDelete {
log.Info("Skipping manipulation for PV with 'Delete' reclaim policy", "pv", pv.Name)
// For PVs with ReclaimPolicy "Delete", we don't need to do anything.
return nil, nil
}
So in case the policyClaim is Delete the controller doesn't try to modify the volume, and k8s can remove it.
In my company we're currently working with this patch in production, and it works, using a custom image in dockerhub.
Fixes #2266
Hello @mumoshu there's any other change beside the one you already suggested?
Regards
I would love to see this merged. @mumoshu @nikola-jokic @rentziass is there anything to be done here, it seems this is just waiting for someone to review and merge
This also affects us, let me know if we can help get this reviewed and merged.
This is also a big problem for our deployment. @mumoshu, please merge this.