diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go index f183498a5540e..b4d1e4b3b047e 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go +++ b/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go @@ -79,6 +79,9 @@ const ( // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:deprecated=1.29 +// +k8s:prerelease-lifecycle-gen:removed=1.32 +// +k8s:prerelease-lifecycle-gen:replacement=admissionregistration.k8s.io,v1,ValidatingAdmissionPolicy // ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. type ValidatingAdmissionPolicy struct { @@ -135,6 +138,9 @@ type ExpressionWarning struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:deprecated=1.29 +// +k8s:prerelease-lifecycle-gen:removed=1.32 +// +k8s:prerelease-lifecycle-gen:replacement=admissionregistration.k8s.io,v1,ValidatingAdmissionPolicyList // ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. type ValidatingAdmissionPolicyList struct { @@ -374,6 +380,9 @@ type AuditAnnotation struct { // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:deprecated=1.29 +// +k8s:prerelease-lifecycle-gen:removed=1.32 +// +k8s:prerelease-lifecycle-gen:replacement=admissionregistration.k8s.io,v1,ValidatingAdmissionPolicyBinding // ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. // ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. @@ -397,6 +406,9 @@ type ValidatingAdmissionPolicyBinding struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:deprecated=1.29 +// +k8s:prerelease-lifecycle-gen:removed=1.32 +// +k8s:prerelease-lifecycle-gen:replacement=admissionregistration.k8s.io,v1,ValidatingAdmissionPolicyBindingList // ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. type ValidatingAdmissionPolicyBindingList struct { diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.prerelease-lifecycle.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.prerelease-lifecycle.go index 91c813d5f7749..5fd460df63538 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.prerelease-lifecycle.go +++ b/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.prerelease-lifecycle.go @@ -21,78 +21,34 @@ limitations under the License. package v1alpha1 +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingAdmissionPolicy) APILifecycleIntroduced() (major, minor int) { return 1, 32 } -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *MutatingAdmissionPolicy) APILifecycleDeprecated() (major, minor int) { - return 1, 35 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *MutatingAdmissionPolicy) APILifecycleRemoved() (major, minor int) { - return 1, 38 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingAdmissionPolicyBinding) APILifecycleIntroduced() (major, minor int) { return 1, 32 } -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *MutatingAdmissionPolicyBinding) APILifecycleDeprecated() (major, minor int) { - return 1, 35 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *MutatingAdmissionPolicyBinding) APILifecycleRemoved() (major, minor int) { - return 1, 38 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingAdmissionPolicyBindingList) APILifecycleIntroduced() (major, minor int) { return 1, 32 } -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *MutatingAdmissionPolicyBindingList) APILifecycleDeprecated() (major, minor int) { - return 1, 35 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *MutatingAdmissionPolicyBindingList) APILifecycleRemoved() (major, minor int) { - return 1, 38 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingAdmissionPolicyList) APILifecycleIntroduced() (major, minor int) { return 1, 32 } -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *MutatingAdmissionPolicyList) APILifecycleDeprecated() (major, minor int) { - return 1, 35 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *MutatingAdmissionPolicyList) APILifecycleRemoved() (major, minor int) { - return 1, 38 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicy) APILifecycleIntroduced() (major, minor int) { @@ -105,6 +61,12 @@ func (in *ValidatingAdmissionPolicy) APILifecycleDeprecated() (major, minor int) return 1, 29 } +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ValidatingAdmissionPolicy) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingAdmissionPolicy"} +} + // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicy) APILifecycleRemoved() (major, minor int) { @@ -123,6 +85,12 @@ func (in *ValidatingAdmissionPolicyBinding) APILifecycleDeprecated() (major, min return 1, 29 } +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ValidatingAdmissionPolicyBinding) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingAdmissionPolicyBinding"} +} + // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicyBinding) APILifecycleRemoved() (major, minor int) { @@ -141,6 +109,12 @@ func (in *ValidatingAdmissionPolicyBindingList) APILifecycleDeprecated() (major, return 1, 29 } +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ValidatingAdmissionPolicyBindingList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingAdmissionPolicyBindingList"} +} + // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicyBindingList) APILifecycleRemoved() (major, minor int) { @@ -159,6 +133,12 @@ func (in *ValidatingAdmissionPolicyList) APILifecycleDeprecated() (major, minor return 1, 29 } +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ValidatingAdmissionPolicyList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingAdmissionPolicyList"} +} + // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicyList) APILifecycleRemoved() (major, minor int) { diff --git a/staging/src/k8s.io/api/authentication/v1alpha1/types.go b/staging/src/k8s.io/api/authentication/v1alpha1/types.go index 1ee3612fbc481..56d772b525205 100644 --- a/staging/src/k8s.io/api/authentication/v1alpha1/types.go +++ b/staging/src/k8s.io/api/authentication/v1alpha1/types.go @@ -26,6 +26,9 @@ import ( // +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:deprecated=1.29 +// +k8s:prerelease-lifecycle-gen:removed=1.32 +// +k8s:prerelease-lifecycle-gen:replacement=authentication.k8s.io,v1,SelfSubjectReview // SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. // When using impersonation, users will receive the user info of the user being impersonated. If impersonation or diff --git a/staging/src/k8s.io/api/authentication/v1alpha1/zz_generated.prerelease-lifecycle.go b/staging/src/k8s.io/api/authentication/v1alpha1/zz_generated.prerelease-lifecycle.go index 62a70a781d176..5d39f1e8ee9b6 100644 --- a/staging/src/k8s.io/api/authentication/v1alpha1/zz_generated.prerelease-lifecycle.go +++ b/staging/src/k8s.io/api/authentication/v1alpha1/zz_generated.prerelease-lifecycle.go @@ -21,6 +21,10 @@ limitations under the License. package v1alpha1 +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *SelfSubjectReview) APILifecycleIntroduced() (major, minor int) { @@ -33,6 +37,12 @@ func (in *SelfSubjectReview) APILifecycleDeprecated() (major, minor int) { return 1, 29 } +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *SelfSubjectReview) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1", Kind: "SelfSubjectReview"} +} + // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *SelfSubjectReview) APILifecycleRemoved() (major, minor int) { diff --git a/staging/src/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go b/staging/src/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go index edbfce79bc753..848185d69c408 100644 --- a/staging/src/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go +++ b/staging/src/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go @@ -33,12 +33,6 @@ func (in *ClusterTrustBundle) APILifecycleDeprecated() (major, minor int) { return 1, 34 } -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *ClusterTrustBundle) APILifecycleRemoved() (major, minor int) { - return 1, 37 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ClusterTrustBundleList) APILifecycleIntroduced() (major, minor int) { @@ -51,44 +45,14 @@ func (in *ClusterTrustBundleList) APILifecycleDeprecated() (major, minor int) { return 1, 34 } -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *ClusterTrustBundleList) APILifecycleRemoved() (major, minor int) { - return 1, 37 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *PodCertificateRequest) APILifecycleIntroduced() (major, minor int) { return 1, 34 } -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *PodCertificateRequest) APILifecycleDeprecated() (major, minor int) { - return 1, 37 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *PodCertificateRequest) APILifecycleRemoved() (major, minor int) { - return 1, 40 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *PodCertificateRequestList) APILifecycleIntroduced() (major, minor int) { return 1, 34 } - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *PodCertificateRequestList) APILifecycleDeprecated() (major, minor int) { - return 1, 37 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *PodCertificateRequestList) APILifecycleRemoved() (major, minor int) { - return 1, 40 -} diff --git a/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go b/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go index a99b9ab5bfd65..e2fe6058d4fe8 100644 --- a/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go +++ b/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go @@ -27,32 +27,8 @@ func (in *LeaseCandidate) APILifecycleIntroduced() (major, minor int) { return 1, 32 } -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *LeaseCandidate) APILifecycleDeprecated() (major, minor int) { - return 1, 35 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *LeaseCandidate) APILifecycleRemoved() (major, minor int) { - return 1, 38 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *LeaseCandidateList) APILifecycleIntroduced() (major, minor int) { return 1, 32 } - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *LeaseCandidateList) APILifecycleDeprecated() (major, minor int) { - return 1, 35 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *LeaseCandidateList) APILifecycleRemoved() (major, minor int) { - return 1, 38 -} diff --git a/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go b/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go index 08e8b6040f389..9d7feac0c927a 100644 --- a/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go @@ -27,32 +27,8 @@ func (in *DeviceTaintRule) APILifecycleIntroduced() (major, minor int) { return 1, 33 } -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *DeviceTaintRule) APILifecycleDeprecated() (major, minor int) { - return 1, 36 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *DeviceTaintRule) APILifecycleRemoved() (major, minor int) { - return 1, 39 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *DeviceTaintRuleList) APILifecycleIntroduced() (major, minor int) { return 1, 33 } - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *DeviceTaintRuleList) APILifecycleDeprecated() (major, minor int) { - return 1, 36 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *DeviceTaintRuleList) APILifecycleRemoved() (major, minor int) { - return 1, 39 -} diff --git a/staging/src/k8s.io/api/storage/v1alpha1/types.go b/staging/src/k8s.io/api/storage/v1alpha1/types.go index 2785b01d4a2b6..f1f8c75ecefb1 100644 --- a/staging/src/k8s.io/api/storage/v1alpha1/types.go +++ b/staging/src/k8s.io/api/storage/v1alpha1/types.go @@ -27,6 +27,7 @@ import ( // +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:removed=1.24 // +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,VolumeAttachment // VolumeAttachment captures the intent to attach or detach the specified volume @@ -55,6 +56,7 @@ 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:removed=1.24 // +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,VolumeAttachmentList // VolumeAttachmentList is a collection of VolumeAttachment objects. @@ -155,6 +157,7 @@ type VolumeError 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:removed=1.24 // +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1beta1,CSIStorageCapacity // CSIStorageCapacity stores the result of one CSI GetCapacity call. @@ -243,6 +246,7 @@ 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:removed=1.24 // +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1beta1,CSIStorageCapacityList // CSIStorageCapacityList is a collection of CSIStorageCapacity objects. diff --git a/staging/src/k8s.io/api/storage/v1alpha1/zz_generated.prerelease-lifecycle.go b/staging/src/k8s.io/api/storage/v1alpha1/zz_generated.prerelease-lifecycle.go index 765e65881f3a2..94da2e085c499 100644 --- a/staging/src/k8s.io/api/storage/v1alpha1/zz_generated.prerelease-lifecycle.go +++ b/staging/src/k8s.io/api/storage/v1alpha1/zz_generated.prerelease-lifecycle.go @@ -139,12 +139,6 @@ func (in *VolumeAttributesClass) APILifecycleReplacement() schema.GroupVersionKi return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "VolumeAttributesClass"} } -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *VolumeAttributesClass) APILifecycleRemoved() (major, minor int) { - return 1, 35 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *VolumeAttributesClassList) APILifecycleIntroduced() (major, minor int) { @@ -162,9 +156,3 @@ func (in *VolumeAttributesClassList) APILifecycleDeprecated() (major, minor int) func (in *VolumeAttributesClassList) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "VolumeAttributesClassList"} } - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *VolumeAttributesClassList) APILifecycleRemoved() (major, minor int) { - return 1, 35 -} diff --git a/staging/src/k8s.io/api/storagemigration/v1alpha1/types.go b/staging/src/k8s.io/api/storagemigration/v1alpha1/types.go index 0f343d1e956e2..9677e1666042e 100644 --- a/staging/src/k8s.io/api/storagemigration/v1alpha1/types.go +++ b/staging/src/k8s.io/api/storagemigration/v1alpha1/types.go @@ -25,6 +25,7 @@ import ( // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.30 +// +k8s:prerelease-lifecycle-gen:deprecated=1.33 // StorageVersionMigration represents a migration of stored data to the latest // storage version. @@ -113,6 +114,7 @@ type StorageVersionMigrationStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.30 +// +k8s:prerelease-lifecycle-gen:deprecated=1.33 // StorageVersionMigrationList is a collection of storage version migrations. type StorageVersionMigrationList struct { diff --git a/staging/src/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go b/staging/src/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go index acdb5743512e6..12319ac3765f3 100644 --- a/staging/src/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go +++ b/staging/src/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go @@ -33,12 +33,6 @@ func (in *StorageVersionMigration) APILifecycleDeprecated() (major, minor int) { return 1, 33 } -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *StorageVersionMigration) APILifecycleRemoved() (major, minor int) { - return 1, 36 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *StorageVersionMigrationList) APILifecycleIntroduced() (major, minor int) { @@ -50,9 +44,3 @@ func (in *StorageVersionMigrationList) APILifecycleIntroduced() (major, minor in func (in *StorageVersionMigrationList) APILifecycleDeprecated() (major, minor int) { return 1, 33 } - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *StorageVersionMigrationList) APILifecycleRemoved() (major, minor int) { - return 1, 36 -} diff --git a/staging/src/k8s.io/code-generator/cmd/prerelease-lifecycle-gen/prerelease-lifecycle-generators/status.go b/staging/src/k8s.io/code-generator/cmd/prerelease-lifecycle-gen/prerelease-lifecycle-generators/status.go index 580bfc68c652c..ddfb233ac2ca5 100644 --- a/staging/src/k8s.io/code-generator/cmd/prerelease-lifecycle-gen/prerelease-lifecycle-generators/status.go +++ b/staging/src/k8s.io/code-generator/cmd/prerelease-lifecycle-gen/prerelease-lifecycle-generators/status.go @@ -374,7 +374,7 @@ func (g *genPreleaseLifecycle) Imports(c *generator.Context) (imports []string) } var ( - isGAVersionRegex = regexp.MustCompile(`^v\d+$`) + isBetaVersionRegex = regexp.MustCompile(`^v\d+beta\d+$`) ) func (g *genPreleaseLifecycle) argsFromType(c *generator.Context, t *types.Type) (generator.Args, error) { @@ -390,7 +390,7 @@ func (g *genPreleaseLifecycle) argsFromType(c *generator.Context, t *types.Type) // Use heuristic to determine whether the package is GA or prerelease. // If the package is GA, the version matches the format vN where N is a number. version := path.Base(t.Name.Package) - isGAVersion := isGAVersionRegex.MatchString(version) + isBetaVersion := isBetaVersionRegex.MatchString(version) a = a. With("introducedMajor", introducedMajor). @@ -410,7 +410,7 @@ func (g *genPreleaseLifecycle) argsFromType(c *generator.Context, t *types.Type) } } - if !isGAVersion || hasDeprecated { + if isBetaVersion || hasDeprecated { a = a. With("deprecatedMajor", deprecatedMajor). With("deprecatedMinor", deprecatedMinor) @@ -427,7 +427,7 @@ func (g *genPreleaseLifecycle) argsFromType(c *generator.Context, t *types.Type) } } - if !isGAVersion || hasRemoved { + if isBetaVersion || hasRemoved { a = a. With("removedMajor", removedMajor). With("removedMinor", removedMinor) diff --git a/staging/src/k8s.io/code-generator/cmd/prerelease-lifecycle-gen/prerelease-lifecycle-generators/status_test.go b/staging/src/k8s.io/code-generator/cmd/prerelease-lifecycle-gen/prerelease-lifecycle-generators/status_test.go index 96e392047ebaa..95a4de8cb2229 100644 --- a/staging/src/k8s.io/code-generator/cmd/prerelease-lifecycle-gen/prerelease-lifecycle-generators/status_test.go +++ b/staging/src/k8s.io/code-generator/cmd/prerelease-lifecycle-gen/prerelease-lifecycle-generators/status_test.go @@ -246,10 +246,6 @@ func TestArgsFromType(t *testing.T) { expected: generator.Args{ "introducedMajor": 1, "introducedMinor": 5, - "deprecatedMajor": 1, - "deprecatedMinor": 8, - "removedMajor": 1, - "removedMinor": 11, }, }, } diff --git a/staging/src/k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/types.go b/staging/src/k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/types.go index a0b3eed416e23..4de3aef89c1fa 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/types.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/types.go @@ -20,6 +20,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.0 +// +k8s:prerelease-lifecycle-gen:deprecated=1.3 // +k8s:prerelease-lifecycle-gen:removed=1.10 // FlunderList is a list of Flunder objects. @@ -50,6 +51,7 @@ type FlunderStatus struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.0 +// +k8s:prerelease-lifecycle-gen:deprecated=1.3 // +k8s:prerelease-lifecycle-gen:removed=1.10 type Flunder struct { @@ -64,6 +66,7 @@ type Flunder struct { // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.0 +// +k8s:prerelease-lifecycle-gen:deprecated=1.3 // +k8s:prerelease-lifecycle-gen:removed=1.10 type Fischer struct { @@ -78,6 +81,7 @@ type Fischer struct { // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.0 +// +k8s:prerelease-lifecycle-gen:deprecated=1.3 // +k8s:prerelease-lifecycle-gen:removed=1.10 // FischerList is a list of Fischer objects.