From 44a8d72d3265b987f60b2a35287ead602d19f19f Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Thu, 30 Jul 2020 09:55:12 -0400 Subject: [PATCH] Mark componentstatus as deprecated --- api/openapi-spec/swagger.json | 4 +- pkg/apis/core/types.go | 2 + staging/src/k8s.io/api/core/v1/BUILD | 1 + .../src/k8s.io/api/core/v1/generated.proto | 2 + staging/src/k8s.io/api/core/v1/lifecycle.go | 37 +++++++++++++++++++ staging/src/k8s.io/api/core/v1/types.go | 2 + .../core/v1/types_swagger_doc_generated.go | 4 +- 7 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 staging/src/k8s.io/api/core/v1/lifecycle.go diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 285346fc30d..13e8d591858 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -5285,7 +5285,7 @@ "type": "object" }, "io.k8s.api.core.v1.ComponentStatus": { - "description": "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", + "description": "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -5319,7 +5319,7 @@ ] }, "io.k8s.api.core.v1.ComponentStatusList": { - "description": "Status of all the conditions for the component as a list of ComponentStatus objects.", + "description": "Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index 1af03e2990c..0f777c79932 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -5109,6 +5109,7 @@ type ComponentCondition struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ComponentStatus (and ComponentStatusList) holds the cluster validation info. +// Deprecated: This API is deprecated in v1.19+ type ComponentStatus struct { metav1.TypeMeta // +optional @@ -5121,6 +5122,7 @@ type ComponentStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ComponentStatusList represents the list of component statuses +// Deprecated: This API is deprecated in v1.19+ type ComponentStatusList struct { metav1.TypeMeta // +optional diff --git a/staging/src/k8s.io/api/core/v1/BUILD b/staging/src/k8s.io/api/core/v1/BUILD index 51b5b284813..3fd4f39d55f 100644 --- a/staging/src/k8s.io/api/core/v1/BUILD +++ b/staging/src/k8s.io/api/core/v1/BUILD @@ -21,6 +21,7 @@ go_library( "annotation_key_constants.go", "doc.go", "generated.pb.go", + "lifecycle.go", "objectreference.go", "register.go", "resource.go", diff --git a/staging/src/k8s.io/api/core/v1/generated.proto b/staging/src/k8s.io/api/core/v1/generated.proto index 3ae96250c2b..916e2601e69 100644 --- a/staging/src/k8s.io/api/core/v1/generated.proto +++ b/staging/src/k8s.io/api/core/v1/generated.proto @@ -424,6 +424,7 @@ message ComponentCondition { } // ComponentStatus (and ComponentStatusList) holds the cluster validation info. +// Deprecated: This API is deprecated in v1.19+ message ComponentStatus { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata @@ -438,6 +439,7 @@ message ComponentStatus { } // Status of all the conditions for the component as a list of ComponentStatus objects. +// Deprecated: This API is deprecated in v1.19+ message ComponentStatusList { // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds diff --git a/staging/src/k8s.io/api/core/v1/lifecycle.go b/staging/src/k8s.io/api/core/v1/lifecycle.go new file mode 100644 index 00000000000..21ca90e815d --- /dev/null +++ b/staging/src/k8s.io/api/core/v1/lifecycle.go @@ -0,0 +1,37 @@ +/* +Copyright 2020 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. +*/ + +package v1 + +// APILifecycleIntroduced returns the release in which the API struct was introduced as int versions of major and minor for comparison. +func (in *ComponentStatus) APILifecycleIntroduced() (major, minor int) { + return 1, 0 +} + +// APILifecycleDeprecated returns the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +func (in *ComponentStatus) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleIntroduced returns the release in which the API struct was introduced as int versions of major and minor for comparison. +func (in *ComponentStatusList) APILifecycleIntroduced() (major, minor int) { + return 1, 0 +} + +// APILifecycleDeprecated returns the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +func (in *ComponentStatusList) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 08b6c700672..f3ec52e71c6 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -5828,6 +5828,7 @@ type ComponentCondition struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ComponentStatus (and ComponentStatusList) holds the cluster validation info. +// Deprecated: This API is deprecated in v1.19+ type ComponentStatus struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -5845,6 +5846,7 @@ type ComponentStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Status of all the conditions for the component as a list of ComponentStatus objects. +// Deprecated: This API is deprecated in v1.19+ type ComponentStatusList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. diff --git a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go index 2969a9b0e51..61832b8159a 100644 --- a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -230,7 +230,7 @@ func (ComponentCondition) SwaggerDoc() map[string]string { } var map_ComponentStatus = map[string]string{ - "": "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", + "": "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "conditions": "List of component conditions observed", } @@ -240,7 +240,7 @@ func (ComponentStatus) SwaggerDoc() map[string]string { } var map_ComponentStatusList = map[string]string{ - "": "Status of all the conditions for the component as a list of ComponentStatus objects.", + "": "Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of ComponentStatus objects.", }