From 46fdfeb4eb499e9bcd02370525dcb2ef7851338b Mon Sep 17 00:00:00 2001 From: Xing Yang Date: Mon, 27 Aug 2018 10:33:20 -0700 Subject: [PATCH] Modify comments for DataSource --- pkg/apis/core/types.go | 5 ++++- staging/src/k8s.io/api/core/v1/types.go | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index 5697328e7d1..e570af7d597 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -415,7 +415,10 @@ type PersistentVolumeClaimSpec struct { VolumeMode *PersistentVolumeMode // 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. - // If the provisioner does not support it, it will fail to provision the volume. + // If the provisioner does not support it, it will create an empty volume. + // 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 DataSource *TypedLocalObjectReference } diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 3d086c97c7f..70853933fd2 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -458,9 +458,12 @@ type PersistentVolumeClaimSpec struct { // This is an alpha feature and may change in the future. // +optional 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. - // This depends on the provisioner for this volume being able to use the specified source. - // If the provisioner does not support it, it will fail to provision the volume. + // 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. + // If the provisioner does not support it, it will create an empty volume. + // 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 DataSource *TypedLocalObjectReference `json:"dataSource" protobuf:"bytes,7,opt,name=dataSource"` }