mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 14:50:24 +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 a4f6a3407f
)
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…
Reference in New Issue
Block a user