From 622e85239d57aa6440cfd3aa3cc1bec52a405304 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Thu, 9 Nov 2017 12:40:14 +0100 Subject: [PATCH 1/2] deepcopy: remove deepcopy register tags Kubernetes-commit: 72809a08b94650bc8988db37be3a2ee4c6ccd113 --- pkg/apis/apiregistration/doc.go | 2 +- pkg/apis/apiregistration/v1beta1/doc.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/apis/apiregistration/doc.go b/pkg/apis/apiregistration/doc.go index c090f1602..def606a7e 100644 --- a/pkg/apis/apiregistration/doc.go +++ b/pkg/apis/apiregistration/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register +// +k8s:deepcopy-gen=package // Package api is the internal version of the API. // +groupName=apiregistration.k8s.io diff --git a/pkg/apis/apiregistration/v1beta1/doc.go b/pkg/apis/apiregistration/v1beta1/doc.go index 594192ffd..d5de2002b 100644 --- a/pkg/apis/apiregistration/v1beta1/doc.go +++ b/pkg/apis/apiregistration/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register +// +k8s:deepcopy-gen=package // +k8s:conversion-gen=k8s.io/kube-aggregator/pkg/apis/apiregistration // +k8s:openapi-gen=true From 7f61ff917517bffea120e348d8378ae023945f58 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Thu, 9 Nov 2017 12:27:20 +0100 Subject: [PATCH 2/2] Update generated code Kubernetes-commit: 1e79dfb959896f2e51be87ecef491452bd17724c --- pkg/apis/apiregistration/BUILD | 1 - .../v1beta1/zz_generated.deepcopy.go | 39 ------------------- .../apiregistration/zz_generated.deepcopy.go | 39 ------------------- 3 files changed, 79 deletions(-) diff --git a/pkg/apis/apiregistration/BUILD b/pkg/apis/apiregistration/BUILD index 190f07b98..6fa710dab 100644 --- a/pkg/apis/apiregistration/BUILD +++ b/pkg/apis/apiregistration/BUILD @@ -17,7 +17,6 @@ go_library( importpath = "k8s.io/kube-aggregator/pkg/apis/apiregistration", deps = [ "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", ], diff --git a/pkg/apis/apiregistration/v1beta1/zz_generated.deepcopy.go b/pkg/apis/apiregistration/v1beta1/zz_generated.deepcopy.go index 653220a9a..dd64fbd21 100644 --- a/pkg/apis/apiregistration/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/apiregistration/v1beta1/zz_generated.deepcopy.go @@ -21,48 +21,9 @@ limitations under the License. package v1beta1 import ( - conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - reflect "reflect" ) -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -// -// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*APIService).DeepCopyInto(out.(*APIService)) - return nil - }, InType: reflect.TypeOf(&APIService{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*APIServiceCondition).DeepCopyInto(out.(*APIServiceCondition)) - return nil - }, InType: reflect.TypeOf(&APIServiceCondition{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*APIServiceList).DeepCopyInto(out.(*APIServiceList)) - return nil - }, InType: reflect.TypeOf(&APIServiceList{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*APIServiceSpec).DeepCopyInto(out.(*APIServiceSpec)) - return nil - }, InType: reflect.TypeOf(&APIServiceSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*APIServiceStatus).DeepCopyInto(out.(*APIServiceStatus)) - return nil - }, InType: reflect.TypeOf(&APIServiceStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ServiceReference).DeepCopyInto(out.(*ServiceReference)) - return nil - }, InType: reflect.TypeOf(&ServiceReference{})}, - ) -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *APIService) DeepCopyInto(out *APIService) { *out = *in diff --git a/pkg/apis/apiregistration/zz_generated.deepcopy.go b/pkg/apis/apiregistration/zz_generated.deepcopy.go index 30958a6d6..ee9db9426 100644 --- a/pkg/apis/apiregistration/zz_generated.deepcopy.go +++ b/pkg/apis/apiregistration/zz_generated.deepcopy.go @@ -21,48 +21,9 @@ limitations under the License. package apiregistration import ( - conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - reflect "reflect" ) -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -// -// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*APIService).DeepCopyInto(out.(*APIService)) - return nil - }, InType: reflect.TypeOf(&APIService{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*APIServiceCondition).DeepCopyInto(out.(*APIServiceCondition)) - return nil - }, InType: reflect.TypeOf(&APIServiceCondition{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*APIServiceList).DeepCopyInto(out.(*APIServiceList)) - return nil - }, InType: reflect.TypeOf(&APIServiceList{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*APIServiceSpec).DeepCopyInto(out.(*APIServiceSpec)) - return nil - }, InType: reflect.TypeOf(&APIServiceSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*APIServiceStatus).DeepCopyInto(out.(*APIServiceStatus)) - return nil - }, InType: reflect.TypeOf(&APIServiceStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ServiceReference).DeepCopyInto(out.(*ServiceReference)) - return nil - }, InType: reflect.TypeOf(&ServiceReference{})}, - ) -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *APIService) DeepCopyInto(out *APIService) { *out = *in