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:
Madhu Rajanna 2020-01-09 17:22:19 +05:30 committed by Madhu Rajanna
parent ac76531a7c
commit 65818d0136

View File

@ -151,6 +151,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
VolumeId: rbdVol.VolID,
CapacityBytes: rbdVol.VolSize,
VolumeContext: req.GetParameters(),
ContentSource: req.GetVolumeContentSource(),
},
}, nil
}
@ -178,6 +179,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
VolumeId: rbdVol.VolID,
CapacityBytes: rbdVol.VolSize,
VolumeContext: req.GetParameters(),
ContentSource: req.GetVolumeContentSource(),
},
}, nil
}