From 6ee1f64fb3edadf0b4939afbe03411479fc4cbae Mon Sep 17 00:00:00 2001 From: David Eads Date: Wed, 29 Apr 2020 09:19:01 -0400 Subject: [PATCH] add prerelease lifecycle tags to events --- staging/src/k8s.io/api/events/v1beta1/BUILD | 1 + staging/src/k8s.io/api/events/v1beta1/doc.go | 1 + .../src/k8s.io/api/events/v1beta1/types.go | 4 ++ .../zz_generated.prerelease-lifecycle.go | 57 +++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 staging/src/k8s.io/api/events/v1beta1/zz_generated.prerelease-lifecycle.go diff --git a/staging/src/k8s.io/api/events/v1beta1/BUILD b/staging/src/k8s.io/api/events/v1beta1/BUILD index dd6e9170b44..7e5bbf2449d 100644 --- a/staging/src/k8s.io/api/events/v1beta1/BUILD +++ b/staging/src/k8s.io/api/events/v1beta1/BUILD @@ -9,6 +9,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/events/v1beta1", importpath = "k8s.io/api/events/v1beta1", diff --git a/staging/src/k8s.io/api/events/v1beta1/doc.go b/staging/src/k8s.io/api/events/v1beta1/doc.go index 9bec7b3cc11..46048a65b4a 100644 --- a/staging/src/k8s.io/api/events/v1beta1/doc.go +++ b/staging/src/k8s.io/api/events/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=events.k8s.io diff --git a/staging/src/k8s.io/api/events/v1beta1/types.go b/staging/src/k8s.io/api/events/v1beta1/types.go index 6ac9477ef04..03a7518f567 100644 --- a/staging/src/k8s.io/api/events/v1beta1/types.go +++ b/staging/src/k8s.io/api/events/v1beta1/types.go @@ -23,6 +23,8 @@ import ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. type Event struct { @@ -100,6 +102,8 @@ type EventSeries struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // EventList is a list of Event objects. type EventList struct { diff --git a/staging/src/k8s.io/api/events/v1beta1/zz_generated.prerelease-lifecycle.go b/staging/src/k8s.io/api/events/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..2ab7b412b96 --- /dev/null +++ b/staging/src/k8s.io/api/events/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,57 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +// 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 *Event) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// 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 *Event) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// 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 *Event) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// 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 *EventList) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// 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 *EventList) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// 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 *EventList) APILifecycleRemoved() (major, minor int) { + return 1, 25 +}