From 9e7748c6a5a86e89c26086d048c6a664bd0e7287 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 4 Mar 2021 10:47:29 +0100 Subject: [PATCH] CSIStorageCapacity: mark v1alpha1 as deprecated We still need the alpha API for testing with current external-provisioner, but then should remove it shortly after the 1.21 release once the external-provisioner is updated to use the beta API. That VolumeAttachment is still defined in the alpha API looks like an oversight. To minimize changes during the beta graduation of CSIStorageCapacity it is left in place with a deprecation notification in 1.21. --- staging/src/k8s.io/api/storage/v1alpha1/doc.go | 1 + staging/src/k8s.io/api/storage/v1alpha1/types.go | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/staging/src/k8s.io/api/storage/v1alpha1/doc.go b/staging/src/k8s.io/api/storage/v1alpha1/doc.go index 6f7ad7e732d..87440b47aef 100644 --- a/staging/src/k8s.io/api/storage/v1alpha1/doc.go +++ b/staging/src/k8s.io/api/storage/v1alpha1/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +groupName=storage.k8s.io // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true package v1alpha1 // import "k8s.io/api/storage/v1alpha1" diff --git a/staging/src/k8s.io/api/storage/v1alpha1/types.go b/staging/src/k8s.io/api/storage/v1alpha1/types.go index 364e797177e..e530b5da9d2 100644 --- a/staging/src/k8s.io/api/storage/v1alpha1/types.go +++ b/staging/src/k8s.io/api/storage/v1alpha1/types.go @@ -25,6 +25,9 @@ import ( // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.9 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,VolumeAttachment // VolumeAttachment captures the intent to attach or detach the specified volume // to/from the specified node. @@ -50,6 +53,9 @@ type VolumeAttachment struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.9 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,VolumeAttachmentList // VolumeAttachmentList is a collection of VolumeAttachment objects. type VolumeAttachmentList struct { @@ -138,6 +144,9 @@ type VolumeError struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.19 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1beta1,CSIStorageCapacity // CSIStorageCapacity stores the result of one CSI GetCapacity call. // For a given StorageClass, this describes the available capacity in a @@ -204,6 +213,9 @@ type CSIStorageCapacity struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.19 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1beta1,CSIStorageCapacityList // CSIStorageCapacityList is a collection of CSIStorageCapacity objects. type CSIStorageCapacityList struct {