mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-05-30 18:46:41 +00:00
Add ContentSource to the CreateVolume response
if PVC is created from a snapshot, external-provisioner expects the volume ContentSource to be set in Create VolumeResponse Signed-off-by: Madhu Rajanna <madhupr007@gmail.com> (cherry picked from commit a4f6a3407f78492277bf233d03cc81fc2a8b361f)
This commit is contained in:
parent
ac76531a7c
commit
65818d0136
@ -151,6 +151,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
|
|||||||
VolumeId: rbdVol.VolID,
|
VolumeId: rbdVol.VolID,
|
||||||
CapacityBytes: rbdVol.VolSize,
|
CapacityBytes: rbdVol.VolSize,
|
||||||
VolumeContext: req.GetParameters(),
|
VolumeContext: req.GetParameters(),
|
||||||
|
ContentSource: req.GetVolumeContentSource(),
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
@ -178,6 +179,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
|
|||||||
VolumeId: rbdVol.VolID,
|
VolumeId: rbdVol.VolID,
|
||||||
CapacityBytes: rbdVol.VolSize,
|
CapacityBytes: rbdVol.VolSize,
|
||||||
VolumeContext: req.GetParameters(),
|
VolumeContext: req.GetParameters(),
|
||||||
|
ContentSource: req.GetVolumeContentSource(),
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user