From 9437bee177abc81a5e5b82ccf8ce98d6a562752a Mon Sep 17 00:00:00 2001 From: Harsha Narayana Date: Mon, 17 Jul 2023 13:12:26 +0530 Subject: [PATCH] update generated conversion spec --- pkg/apis/componentconfig/types.go | 2 - pkg/apis/componentconfig/v1alpha1/types.go | 2 - .../v1alpha1/zz_generated.conversion.go | 46 +++++++++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 17 +++++++ .../componentconfig/zz_generated.deepcopy.go | 17 +++++++ 5 files changed, 80 insertions(+), 4 deletions(-) diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index 45cbf53fbc..68722c9cba 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -70,8 +70,6 @@ type DeschedulerConfiguration struct { ClientConnection componentbaseconfig.ClientConnectionConfiguration } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - type TracingConfiguration struct { // CollectorEndpoint is the address of the OpenTelemetry collector. // If not specified, tracing will be used NoopTraceProvider. diff --git a/pkg/apis/componentconfig/v1alpha1/types.go b/pkg/apis/componentconfig/v1alpha1/types.go index fa1e58be86..ad1336681b 100644 --- a/pkg/apis/componentconfig/v1alpha1/types.go +++ b/pkg/apis/componentconfig/v1alpha1/types.go @@ -70,8 +70,6 @@ type DeschedulerConfiguration struct { ClientConnection componentbaseconfig.ClientConnectionConfiguration `json:"clientConnection,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - type TracingConfiguration struct { // CollectorEndpoint is the address of the OpenTelemetry collector. // If not specified, tracing will be used NoopTraceProvider. diff --git a/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go b/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go index ed2a399006..dd654b3437 100644 --- a/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go @@ -46,6 +46,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*TracingConfiguration)(nil), (*componentconfig.TracingConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TracingConfiguration_To_componentconfig_TracingConfiguration(a.(*TracingConfiguration), b.(*componentconfig.TracingConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*componentconfig.TracingConfiguration)(nil), (*TracingConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_componentconfig_TracingConfiguration_To_v1alpha1_TracingConfiguration(a.(*componentconfig.TracingConfiguration), b.(*TracingConfiguration), scope) + }); err != nil { + return err + } return nil } @@ -58,6 +68,9 @@ func autoConvert_v1alpha1_DeschedulerConfiguration_To_componentconfig_Deschedule out.MaxNoOfPodsToEvictPerNode = in.MaxNoOfPodsToEvictPerNode out.EvictLocalStoragePods = in.EvictLocalStoragePods out.IgnorePVCPods = in.IgnorePVCPods + if err := Convert_v1alpha1_TracingConfiguration_To_componentconfig_TracingConfiguration(&in.Tracing, &out.Tracing, s); err != nil { + return err + } out.LeaderElection = in.LeaderElection out.Logging = in.Logging out.ClientConnection = in.ClientConnection @@ -78,6 +91,9 @@ func autoConvert_componentconfig_DeschedulerConfiguration_To_v1alpha1_Deschedule out.MaxNoOfPodsToEvictPerNode = in.MaxNoOfPodsToEvictPerNode out.EvictLocalStoragePods = in.EvictLocalStoragePods out.IgnorePVCPods = in.IgnorePVCPods + if err := Convert_componentconfig_TracingConfiguration_To_v1alpha1_TracingConfiguration(&in.Tracing, &out.Tracing, s); err != nil { + return err + } out.LeaderElection = in.LeaderElection out.Logging = in.Logging out.ClientConnection = in.ClientConnection @@ -88,3 +104,33 @@ func autoConvert_componentconfig_DeschedulerConfiguration_To_v1alpha1_Deschedule func Convert_componentconfig_DeschedulerConfiguration_To_v1alpha1_DeschedulerConfiguration(in *componentconfig.DeschedulerConfiguration, out *DeschedulerConfiguration, s conversion.Scope) error { return autoConvert_componentconfig_DeschedulerConfiguration_To_v1alpha1_DeschedulerConfiguration(in, out, s) } + +func autoConvert_v1alpha1_TracingConfiguration_To_componentconfig_TracingConfiguration(in *TracingConfiguration, out *componentconfig.TracingConfiguration, s conversion.Scope) error { + out.CollectorEndpoint = in.CollectorEndpoint + out.TransportCert = in.TransportCert + out.ServiceName = in.ServiceName + out.ServiceNamespace = in.ServiceNamespace + out.SampleRate = in.SampleRate + out.FallbackToNoOpProviderOnError = in.FallbackToNoOpProviderOnError + return nil +} + +// Convert_v1alpha1_TracingConfiguration_To_componentconfig_TracingConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_TracingConfiguration_To_componentconfig_TracingConfiguration(in *TracingConfiguration, out *componentconfig.TracingConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_TracingConfiguration_To_componentconfig_TracingConfiguration(in, out, s) +} + +func autoConvert_componentconfig_TracingConfiguration_To_v1alpha1_TracingConfiguration(in *componentconfig.TracingConfiguration, out *TracingConfiguration, s conversion.Scope) error { + out.CollectorEndpoint = in.CollectorEndpoint + out.TransportCert = in.TransportCert + out.ServiceName = in.ServiceName + out.ServiceNamespace = in.ServiceNamespace + out.SampleRate = in.SampleRate + out.FallbackToNoOpProviderOnError = in.FallbackToNoOpProviderOnError + return nil +} + +// Convert_componentconfig_TracingConfiguration_To_v1alpha1_TracingConfiguration is an autogenerated conversion function. +func Convert_componentconfig_TracingConfiguration_To_v1alpha1_TracingConfiguration(in *componentconfig.TracingConfiguration, out *TracingConfiguration, s conversion.Scope) error { + return autoConvert_componentconfig_TracingConfiguration_To_v1alpha1_TracingConfiguration(in, out, s) +} diff --git a/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go index 5f58e799b8..15a3d620d6 100644 --- a/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go @@ -29,6 +29,7 @@ import ( func (in *DeschedulerConfiguration) DeepCopyInto(out *DeschedulerConfiguration) { *out = *in out.TypeMeta = in.TypeMeta + out.Tracing = in.Tracing out.LeaderElection = in.LeaderElection in.Logging.DeepCopyInto(&out.Logging) out.ClientConnection = in.ClientConnection @@ -52,3 +53,19 @@ func (in *DeschedulerConfiguration) DeepCopyObject() runtime.Object { } return nil } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TracingConfiguration) DeepCopyInto(out *TracingConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TracingConfiguration. +func (in *TracingConfiguration) DeepCopy() *TracingConfiguration { + if in == nil { + return nil + } + out := new(TracingConfiguration) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/apis/componentconfig/zz_generated.deepcopy.go b/pkg/apis/componentconfig/zz_generated.deepcopy.go index 52d8cc2645..18e9c291a0 100644 --- a/pkg/apis/componentconfig/zz_generated.deepcopy.go +++ b/pkg/apis/componentconfig/zz_generated.deepcopy.go @@ -29,6 +29,7 @@ import ( func (in *DeschedulerConfiguration) DeepCopyInto(out *DeschedulerConfiguration) { *out = *in out.TypeMeta = in.TypeMeta + out.Tracing = in.Tracing out.LeaderElection = in.LeaderElection in.Logging.DeepCopyInto(&out.Logging) out.ClientConnection = in.ClientConnection @@ -52,3 +53,19 @@ func (in *DeschedulerConfiguration) DeepCopyObject() runtime.Object { } return nil } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TracingConfiguration) DeepCopyInto(out *TracingConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TracingConfiguration. +func (in *TracingConfiguration) DeepCopy() *TracingConfiguration { + if in == nil { + return nil + } + out := new(TracingConfiguration) + in.DeepCopyInto(out) + return out +}