Namespace Transfer¶
Summary¶
The Object Transfer API allows for logically moving PersistentVolumeClaims and DataVolumes between namespaces. It does this by mainpulating Kubernetes API resources and does not move any physical data on the volume. This API is used internally by the CDI controller to facilitate efficient cross namespace cloning for DataVolumes. It is also possible for cluster admins to use the Object Transfer API directly. Given the following manifest:
apiVersion: cdi.kubevirt.io/v1beta1
kind: ObjectTransfer
metadata:
name: t1
spec:
source:
kind: PersistentVolumeClaim
namespace: source
name: source-pvc
target:
namespace: destintation
name: destination-pvc
The PersistentVolumeClaim source-pvc in the namespace source will be moved to the namespace destination with the given name destination-pvc.
Note that this is a cluster scoped resource. A namespace scoped API is forthcoming.
Transfer Operations¶
The following operations occur when the the ObjectTransfer above is executed:
- The PersistentVolume
source-pvcis bound to (source-pv) is set toRetainif not already source-pvcis deletedsource-pvclaimRef is set todestination\destination-pvcdestination-pvcis created with the same spec assource-pvcbefore it was deleted