spec icon indicating copy to clipboard operation
spec copied to clipboard

Clarify that VolumeContentSource is required for pre-populated volumes

Open xing-yang opened this issue 5 years ago • 1 comments

In https://github.com/container-storage-interface/spec/blob/master/spec.md#createvolume, we have the following:

   // If specified, indicates that the volume is not empty and is
  // pre-populated with data from the specified source.
  // This field is OPTIONAL.
  VolumeContentSource content_source = 4;

The sentence "This field is OPTIONAL" is confusing. It means this field is not required in CreateVolumeResponse in general, however, it is required for pre-populated volume.

Some CSI driver developers found it confusing after we introduced a check to make sure content_source is set for pre-populated volume (https://github.com/kubernetes-csi/external-provisioner/pull/283).

This should be clarified in the CSI spec.

xing-yang avatar Dec 11 '19 13:12 xing-yang

/assign @xing-yang

xing-yang avatar Dec 11 '19 13:12 xing-yang