Clarify comments for DataSource

This commit is contained in:
Xing Yang 2018-08-27 20:31:19 -07:00
parent 46fdfeb4eb
commit 2e4f6eca0e
2 changed files with 11 additions and 7 deletions

View File

@ -415,7 +415,9 @@ type PersistentVolumeClaimSpec struct {
VolumeMode *PersistentVolumeMode VolumeMode *PersistentVolumeMode
// If specified, volume will be prepopulated with data from the specified data source. // If specified, volume will be prepopulated with data from the specified data source.
// This depends on the provisioner for this volume being able to use the specified source. // This depends on the provisioner for this volume being able to use the specified source.
// If the provisioner does not support it, it will create an empty volume. // If the provisioner failed to populate the volume with the source, it will return an
// error and fail the create volume operation. If the provisioner does not support the
// data source, it will also return an error and fail the create volume operation.
// It requires the VolumeSnapshotDataSource alpha feature gate to be enabled and // It requires the VolumeSnapshotDataSource alpha feature gate to be enabled and
// currently VolumeSnapshot is the only supported data source. // currently VolumeSnapshot is the only supported data source.
// In the future, we will allow more data source types when new feature is ready. // In the future, we will allow more data source types when new feature is ready.

View File

@ -458,12 +458,14 @@ type PersistentVolumeClaimSpec struct {
// This is an alpha feature and may change in the future. // This is an alpha feature and may change in the future.
// +optional // +optional
VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"` VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"`
// If specified, volume will be prepopulated with data from the specified data source. // If specified, volume will be prepopulated with data from the specified data source.
// This depends on the provisioner for this volume being able to use the specified source. // This depends on the provisioner for this volume being able to use the specified source.
// If the provisioner does not support it, it will create an empty volume. // If the provisioner failed to populate the volume with the source, it will return an
// It requires the VolumeSnapshotDataSource alpha feature gate to be enabled and // error and fail the create volume operation. If the provisioner does not support the
// currently VolumeSnapshot is the only supported data source. // data source, it will also return an error and fail the create volume operation.
// In the future, we will allow more data source types when new feature is ready. // It requires the VolumeSnapshotDataSource alpha feature gate to be enabled and
// currently VolumeSnapshot is the only supported data source.
// In the future, we will allow more data source types when new feature is ready.
// +optional // +optional
DataSource *TypedLocalObjectReference `json:"dataSource" protobuf:"bytes,7,opt,name=dataSource"` DataSource *TypedLocalObjectReference `json:"dataSource" protobuf:"bytes,7,opt,name=dataSource"`
} }