kubernetes-csi/external-provisioner

Limitation on cloning volume with a different Storage Class

teiginc opened this issue · 4 comments

Hi,
in the external-provisioner v3.2 "Users will be able to clone a volume with a different Storage Class. The destination volume no longer has to be the same storage class as the source.".
From the controller.go we can see that the cloning is not admitted in case the CSI driver of the source volume and the CSI driver of the target volume are not equal:
if sourcePV.Spec.CSI.Driver != sc.Provisioner {
klog.Warningf("the source volume %s for PVC %s/%s is handled by a different CSI driver than requested by StorageClass %s", sourcePVC.Spec.VolumeName, sourcePVC.Namespace, sourcePVC.Name, *claim.Spec.StorageClassName)
return nil, fmt.Errorf("claim in dataSource not bound or invalid")
}
I didn't get if this limitation is wanted or it is a missing impact.
Thank you.