Change:
/kind feature /sig storage /sig api PVC Data Sources have been in beta since 1.16 and should be ready to be promoted to GA in the 1.18 release. KEP:
The label(s) cannot be applied, because the repository doesn't have them <detailsIn response to : /kind feature /sig storage /sig api Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details

Discussion:
}, "dataSource": { "$ref": "#/definitions/io.k8s.api.core.v1.TypedLocalObjectReference", <del> "description": "This field requires the VolumeSnapshotDataSource alpha feature gate to be enabled and currently VolumeSnapshot is the only supported data source. If the provisioner can support VolumeSnapshot data source, it will create a new volume and data will be restored to the volume at the same time. If the provisioner does not support VolumeSnapshot data source, volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change." </del> <ins> "description": "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta) * An existing PVC (PersistentVolumeClaim) In order to use VolumeSnapshot object types, the appropriate feature gate must be enabled (VolumeSnapshotDataSource) If the provisioner can support the specified data source, it will create a new volume based on the contents of the specified PVC or Snapshot. If the provisioner does not support the specified data source, the volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change." </ins> }, "resources": { "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements",

if pvcSpec.DataSource.APIGroup != nil { apiGroup = *pvcSpec.DataSource.APIGroup } <del> if utilfeature.DefaultFeatureGate.Enabled(features.VolumePVCDataSource) && pvcSpec.DataSource.Kind == pvc && </del> <ins> if pvcSpec.DataSource.Kind == pvc && </ins> apiGroup == "" { return true

} var tests = map[string]struct { <del> spec        core.PersistentVolumeClaimSpec gateEnabled bool want        *core.TypedLocalObjectReference </del> <ins> spec core.PersistentVolumeClaimSpec want *core.TypedLocalObjectReference </ins> }{ "enabled with empty ds": { <del> spec:        core.PersistentVolumeClaimSpec{}, gateEnabled: true, want:        nil, </del> <ins> spec: core.PersistentVolumeClaimSpec{}, want: nil, </ins> }, "enabled with invalid spec": { <del> spec:        invalidSpec, gateEnabled: true, want:        nil, </del> <ins> spec: invalidSpec, want: nil, </ins> }, "enabled with valid spec": { <del> spec:        validSpec, gateEnabled: true, want:        validSpec.DataSource, }, "disabled with invalid spec": { spec:        invalidSpec, gateEnabled: false, want:        nil, }, "disabled with valid spec": { spec:        validSpec, gateEnabled: false, want:        nil, }, "diabled with empty ds": { spec:        core.PersistentVolumeClaimSpec{}, gateEnabled: false, want:        nil, </del> <ins> spec: validSpec, want: validSpec.DataSource, </ins> }, "enabled with valid spec but nil APIGroup": { <del> spec:        validSpecNilAPIGroup, gateEnabled: true, want:        validSpecNilAPIGroup.DataSource, }, "disabled with valid spec but nil APIGroup": { spec:        validSpecNilAPIGroup, gateEnabled: false, want:        nil, </del> <ins> spec: validSpecNilAPIGroup, want: validSpecNilAPIGroup.DataSource, </ins> }, } for testName, test := range tests { t.Run(testName, func(t *testing.T) { <del> defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.VolumePVCDataSource, test.gateEnabled)() </del> DropDisabledFields(&test.spec, nil) if test.spec.DataSource != test.want { <del> t.Errorf("expected drop datasource condition was not met, test: %s, gateEnabled: %v, spec: %v, expected: %v", testName, test.gateEnabled, test.spec, test.want) </del> <ins> t.Errorf("expected drop datasource condition was not met, test: %s, spec: %v, expected: %v", testName, test.spec, test.want) </ins> } })

// +optional VolumeMode *PersistentVolumeMode // This field can be used to specify either: <del> // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) </del> <ins> // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta) </ins> // * An existing PVC (PersistentVolumeClaim) <del> // In order to use either of these DataSource types, the appropriate feature gate // must be enabled (VolumeSnapshotDataSource, VolumePVCDataSource) </del> <ins> // In order to use VolumeSnapshot object types, the appropriate feature gate // must be enabled (VolumeSnapshotDataSource) </ins> // If the provisioner can support the specified data source, it will create // a new volume based on the contents of the specified PVC or Snapshot. // If the provisioner does not support the specified data source, the volume will

// owner: @j-griffith // alpha: v1.15 // beta: v1.16 <ins> // GA: v1.18 </ins> // // Enable support for specifying an existing PVC as a DataSource VolumePVCDataSource featuregate.Feature = "VolumePVCDataSource"

ServiceLoadBalancerFinalizer:   {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, LocalStorageCapacityIsolationFSQuotaMonitoring: {Default: false, PreRelease: featuregate.Alpha}, NonPreemptingPriority:                          {Default: false, PreRelease: featuregate.Alpha}, <del> VolumePVCDataSource:                            {Default: true, PreRelease: featuregate.Beta}, </del> <ins> VolumePVCDataSource:                            {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.20 </ins> PodOverhead:                                    {Default: true, PreRelease: featuregate.Beta}, IPv6DualStack:                                  {Default: false, PreRelease: featuregate.Alpha}, EndpointSlice:                                  {Default: true, PreRelease: featuregate.Beta},

// +optional optional string volumeMode = 6; <del> // This field requires the VolumeSnapshotDataSource alpha feature gate to be // enabled and currently VolumeSnapshot is the only supported data source. // If the provisioner can support VolumeSnapshot data source, it will create // a new volume and data will be restored to the volume at the same time. // If the provisioner does not support VolumeSnapshot data source, volume will </del> <ins> // This field can be used to specify either: // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta) // * An existing PVC (PersistentVolumeClaim) // In order to use VolumeSnapshot object types, the appropriate feature gate // must be enabled (VolumeSnapshotDataSource) // If the provisioner can support the specified data source, it will create // a new volume based on the contents of the specified PVC or Snapshot. // If the provisioner does not support the specified data source, the volume will </ins> // not be created and the failure will be reported as an event. // In the future, we plan to support more data source types and the behavior // of the provisioner may change.

// Value of Filesystem is implied when not included in claim spec. // +optional VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"` <del> // This field requires the VolumeSnapshotDataSource alpha feature gate to be // enabled and currently VolumeSnapshot is the only supported data source. // If the provisioner can support VolumeSnapshot data source, it will create // a new volume and data will be restored to the volume at the same time. // If the provisioner does not support VolumeSnapshot data source, volume will </del> <ins> // This field can be used to specify either: // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta) // * An existing PVC (PersistentVolumeClaim) // In order to use VolumeSnapshot object types, the appropriate feature gate // must be enabled (VolumeSnapshotDataSource) // If the provisioner can support the specified data source, it will create // a new volume based on the contents of the specified PVC or Snapshot. // If the provisioner does not support the specified data source, the volume will </ins> // not be created and the failure will be reported as an event. // In the future, we plan to support more data source types and the behavior // of the provisioner may change.

"volumeName":       "VolumeName is the binding reference to the PersistentVolume backing this claim.", "storageClassName": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", "volumeMode":       "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", <del> "dataSource":       "This field requires the VolumeSnapshotDataSource alpha feature gate to be enabled and currently VolumeSnapshot is the only supported data source. If the provisioner can support VolumeSnapshot data source, it will create a new volume and data will be restored to the volume at the same time. If the provisioner does not support VolumeSnapshot data source, volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change.", </del> <ins> "dataSource":       "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta) * An existing PVC (PersistentVolumeClaim) In order to use VolumeSnapshot object types, the appropriate feature gate must be enabled (VolumeSnapshotDataSource) If the provisioner can support the specified data source, it will create a new volume based on the contents of the specified PVC or Snapshot. If the provisioner does not support the specified data source, the volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change.", </ins> } func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string {