diff --git a/cmd/kubeadm/app/apis/output/fuzzer/fuzzer.go b/cmd/kubeadm/app/apis/output/fuzzer/fuzzer.go index 433af82853e..bc02a9a6af3 100644 --- a/cmd/kubeadm/app/apis/output/fuzzer/fuzzer.go +++ b/cmd/kubeadm/app/apis/output/fuzzer/fuzzer.go @@ -33,7 +33,6 @@ import ( func Funcs(codecs runtimeserializer.CodecFactory) []interface{} { return []interface{}{ fuzzBootstrapToken, - fuzzUpgradePlan, } } @@ -46,10 +45,3 @@ func fuzzBootstrapToken(obj *output.BootstrapToken, c fuzz.Continue) { obj.Usages = []string{"authentication", "signing"} obj.Groups = []string{constants.NodeBootstrapTokenAuthGroup} } - -// TODO: Remove this func when v1alpha2 is removed -func fuzzUpgradePlan(obj *output.UpgradePlan, c fuzz.Continue) { - // Pin the value to avoid round tripping the AvailableUpgrades field - // which is not present in the v1alpha2 version. - obj.AvailableUpgrades = nil -} diff --git a/cmd/kubeadm/app/apis/output/scheme/scheme.go b/cmd/kubeadm/app/apis/output/scheme/scheme.go index 67c9ab9a604..ee7c198bc78 100644 --- a/cmd/kubeadm/app/apis/output/scheme/scheme.go +++ b/cmd/kubeadm/app/apis/output/scheme/scheme.go @@ -24,7 +24,6 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubernetes/cmd/kubeadm/app/apis/output" - "k8s.io/kubernetes/cmd/kubeadm/app/apis/output/v1alpha2" "k8s.io/kubernetes/cmd/kubeadm/app/apis/output/v1alpha3" ) @@ -42,7 +41,6 @@ func init() { // AddToScheme builds the kubeadm scheme using all known versions of the kubeadm api. func AddToScheme(scheme *runtime.Scheme) { utilruntime.Must(output.AddToScheme(scheme)) - utilruntime.Must(v1alpha2.AddToScheme(scheme)) utilruntime.Must(v1alpha3.AddToScheme(scheme)) - utilruntime.Must(scheme.SetVersionPriority(v1alpha3.SchemeGroupVersion, v1alpha2.SchemeGroupVersion)) + utilruntime.Must(scheme.SetVersionPriority(v1alpha3.SchemeGroupVersion)) } diff --git a/cmd/kubeadm/app/apis/output/types.go b/cmd/kubeadm/app/apis/output/types.go index bb36bc3aede..16e696ec51f 100644 --- a/cmd/kubeadm/app/apis/output/types.go +++ b/cmd/kubeadm/app/apis/output/types.go @@ -93,9 +93,6 @@ type UpgradePlan struct { AvailableUpgrades []AvailableUpgrade ConfigVersions []ComponentConfigVersionState - - // TODO: Remove this field when v1alpha2 is removed - Components []ComponentUpgradePlan } // Certificate represents information for a certificate or a certificate authority when using the check-expiration command. diff --git a/cmd/kubeadm/app/apis/output/v1alpha2/conversion.go b/cmd/kubeadm/app/apis/output/v1alpha2/conversion.go deleted file mode 100644 index d533ded71cd..00000000000 --- a/cmd/kubeadm/app/apis/output/v1alpha2/conversion.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2024 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 v1alpha2 - -import ( - "k8s.io/apimachinery/pkg/conversion" - - "k8s.io/kubernetes/cmd/kubeadm/app/apis/output" -) - -// Convert_output_UpgradePlan_To_v1alpha2_UpgradePlan converts a private UpgradePlan to public UpgradePlan. -func Convert_output_UpgradePlan_To_v1alpha2_UpgradePlan(in *output.UpgradePlan, out *UpgradePlan, s conversion.Scope) error { - return autoConvert_output_UpgradePlan_To_v1alpha2_UpgradePlan(in, out, s) -} - -// Convert_output_ComponentUpgradePlan_To_v1alpha2_ComponentUpgradePlan converts a private ComponentUpgradePlan to public ComponentUpgradePlan. -func Convert_output_ComponentUpgradePlan_To_v1alpha2_ComponentUpgradePlan(in *output.ComponentUpgradePlan, out *ComponentUpgradePlan, s conversion.Scope) error { - return autoConvert_output_ComponentUpgradePlan_To_v1alpha2_ComponentUpgradePlan(in, out, s) -} diff --git a/cmd/kubeadm/app/apis/output/v1alpha2/doc.go b/cmd/kubeadm/app/apis/output/v1alpha2/doc.go deleted file mode 100644 index 20e7e246db1..00000000000 --- a/cmd/kubeadm/app/apis/output/v1alpha2/doc.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2021 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. -*/ - -// +groupName=output.kubeadm.k8s.io -// +k8s:deepcopy-gen=package -// +k8s:conversion-gen=k8s.io/kubernetes/cmd/kubeadm/app/apis/output - -// Package v1alpha2 defines the v1alpha2 version of the kubeadm data structures -// related to structured output -// The purpose of the kubeadm structured output is to have a well -// defined versioned output format that other software that uses -// kubeadm for cluster deployments can use and rely on. -// DEPRECATED: this API will be removed in a future release. Please use v1alpha3. -package v1alpha2 // import "k8s.io/kubernetes/cmd/kubeadm/app/apis/output/v1alpha2" diff --git a/cmd/kubeadm/app/apis/output/v1alpha2/register.go b/cmd/kubeadm/app/apis/output/v1alpha2/register.go deleted file mode 100644 index 7e01a1393ec..00000000000 --- a/cmd/kubeadm/app/apis/output/v1alpha2/register.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2021 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 v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// GroupName is the group name use in this package -const GroupName = "output.kubeadm.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} - -var ( - // SchemeBuilder points to a list of functions added to Scheme. - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - // AddToScheme applies all the stored functions to the scheme. - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &BootstrapToken{}, - &Images{}, - &UpgradePlan{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/cmd/kubeadm/app/apis/output/v1alpha2/types.go b/cmd/kubeadm/app/apis/output/v1alpha2/types.go deleted file mode 100644 index 529c029dd59..00000000000 --- a/cmd/kubeadm/app/apis/output/v1alpha2/types.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -Copyright 2021 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 v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - bootstraptokenv1 "k8s.io/kubernetes/cmd/kubeadm/app/apis/bootstraptoken/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BootstrapToken represents information for the bootstrap token output produced by kubeadm -type BootstrapToken struct { - metav1.TypeMeta `json:",inline"` - - bootstraptokenv1.BootstrapToken -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Images represents information for the output produced by 'kubeadm config images list' -type Images struct { - metav1.TypeMeta `json:",inline"` - - Images []string `json:"images"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ComponentUpgradePlan represents information about upgrade plan for one component -type ComponentUpgradePlan struct { - metav1.TypeMeta - - Name string `json:"name"` - CurrentVersion string `json:"currentVersion"` - NewVersion string `json:"newVersion"` -} - -// ComponentConfigVersionState describes the current and desired version of a component config -type ComponentConfigVersionState struct { - // Group points to the Kubernetes API group that covers the config - Group string `json:"group"` - - // CurrentVersion is the currently active component config version - // NOTE: This can be empty in case the config was not found on the cluster or it was unsupported - // kubeadm generated version - CurrentVersion string `json:"currentVersion"` - - // PreferredVersion is the component config version that is currently preferred by kubeadm for use. - // NOTE: As of today, this is the only version supported by kubeadm. - PreferredVersion string `json:"preferredVersion"` - - // ManualUpgradeRequired indicates if users need to manually upgrade their component config versions. This happens if - // the CurrentVersion of the config is user supplied (or modified) and no longer supported. Users should upgrade - // their component configs to PreferredVersion or any other supported component config version. - ManualUpgradeRequired bool `json:"manualUpgradeRequired"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// UpgradePlan represents information about upgrade plan for the output -// produced by 'kubeadm upgrade plan' -type UpgradePlan struct { - metav1.TypeMeta - - Components []ComponentUpgradePlan `json:"components"` - - ConfigVersions []ComponentConfigVersionState `json:"configVersions"` -} diff --git a/cmd/kubeadm/app/apis/output/v1alpha2/zz_generated.conversion.go b/cmd/kubeadm/app/apis/output/v1alpha2/zz_generated.conversion.go deleted file mode 100644 index a04031bdb17..00000000000 --- a/cmd/kubeadm/app/apis/output/v1alpha2/zz_generated.conversion.go +++ /dev/null @@ -1,214 +0,0 @@ -//go:build !ignore_autogenerated -// +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 conversion-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - unsafe "unsafe" - - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - output "k8s.io/kubernetes/cmd/kubeadm/app/apis/output" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*BootstrapToken)(nil), (*output.BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_BootstrapToken_To_output_BootstrapToken(a.(*BootstrapToken), b.(*output.BootstrapToken), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*output.BootstrapToken)(nil), (*BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_output_BootstrapToken_To_v1alpha2_BootstrapToken(a.(*output.BootstrapToken), b.(*BootstrapToken), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ComponentConfigVersionState)(nil), (*output.ComponentConfigVersionState)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ComponentConfigVersionState_To_output_ComponentConfigVersionState(a.(*ComponentConfigVersionState), b.(*output.ComponentConfigVersionState), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*output.ComponentConfigVersionState)(nil), (*ComponentConfigVersionState)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_output_ComponentConfigVersionState_To_v1alpha2_ComponentConfigVersionState(a.(*output.ComponentConfigVersionState), b.(*ComponentConfigVersionState), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ComponentUpgradePlan)(nil), (*output.ComponentUpgradePlan)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ComponentUpgradePlan_To_output_ComponentUpgradePlan(a.(*ComponentUpgradePlan), b.(*output.ComponentUpgradePlan), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Images)(nil), (*output.Images)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_Images_To_output_Images(a.(*Images), b.(*output.Images), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*output.Images)(nil), (*Images)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_output_Images_To_v1alpha2_Images(a.(*output.Images), b.(*Images), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*UpgradePlan)(nil), (*output.UpgradePlan)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_UpgradePlan_To_output_UpgradePlan(a.(*UpgradePlan), b.(*output.UpgradePlan), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*output.ComponentUpgradePlan)(nil), (*ComponentUpgradePlan)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_output_ComponentUpgradePlan_To_v1alpha2_ComponentUpgradePlan(a.(*output.ComponentUpgradePlan), b.(*ComponentUpgradePlan), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*output.UpgradePlan)(nil), (*UpgradePlan)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_output_UpgradePlan_To_v1alpha2_UpgradePlan(a.(*output.UpgradePlan), b.(*UpgradePlan), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha2_BootstrapToken_To_output_BootstrapToken(in *BootstrapToken, out *output.BootstrapToken, s conversion.Scope) error { - out.BootstrapToken = in.BootstrapToken - return nil -} - -// Convert_v1alpha2_BootstrapToken_To_output_BootstrapToken is an autogenerated conversion function. -func Convert_v1alpha2_BootstrapToken_To_output_BootstrapToken(in *BootstrapToken, out *output.BootstrapToken, s conversion.Scope) error { - return autoConvert_v1alpha2_BootstrapToken_To_output_BootstrapToken(in, out, s) -} - -func autoConvert_output_BootstrapToken_To_v1alpha2_BootstrapToken(in *output.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { - out.BootstrapToken = in.BootstrapToken - return nil -} - -// Convert_output_BootstrapToken_To_v1alpha2_BootstrapToken is an autogenerated conversion function. -func Convert_output_BootstrapToken_To_v1alpha2_BootstrapToken(in *output.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { - return autoConvert_output_BootstrapToken_To_v1alpha2_BootstrapToken(in, out, s) -} - -func autoConvert_v1alpha2_ComponentConfigVersionState_To_output_ComponentConfigVersionState(in *ComponentConfigVersionState, out *output.ComponentConfigVersionState, s conversion.Scope) error { - out.Group = in.Group - out.CurrentVersion = in.CurrentVersion - out.PreferredVersion = in.PreferredVersion - out.ManualUpgradeRequired = in.ManualUpgradeRequired - return nil -} - -// Convert_v1alpha2_ComponentConfigVersionState_To_output_ComponentConfigVersionState is an autogenerated conversion function. -func Convert_v1alpha2_ComponentConfigVersionState_To_output_ComponentConfigVersionState(in *ComponentConfigVersionState, out *output.ComponentConfigVersionState, s conversion.Scope) error { - return autoConvert_v1alpha2_ComponentConfigVersionState_To_output_ComponentConfigVersionState(in, out, s) -} - -func autoConvert_output_ComponentConfigVersionState_To_v1alpha2_ComponentConfigVersionState(in *output.ComponentConfigVersionState, out *ComponentConfigVersionState, s conversion.Scope) error { - out.Group = in.Group - out.CurrentVersion = in.CurrentVersion - out.PreferredVersion = in.PreferredVersion - out.ManualUpgradeRequired = in.ManualUpgradeRequired - return nil -} - -// Convert_output_ComponentConfigVersionState_To_v1alpha2_ComponentConfigVersionState is an autogenerated conversion function. -func Convert_output_ComponentConfigVersionState_To_v1alpha2_ComponentConfigVersionState(in *output.ComponentConfigVersionState, out *ComponentConfigVersionState, s conversion.Scope) error { - return autoConvert_output_ComponentConfigVersionState_To_v1alpha2_ComponentConfigVersionState(in, out, s) -} - -func autoConvert_v1alpha2_ComponentUpgradePlan_To_output_ComponentUpgradePlan(in *ComponentUpgradePlan, out *output.ComponentUpgradePlan, s conversion.Scope) error { - out.Name = in.Name - out.CurrentVersion = in.CurrentVersion - out.NewVersion = in.NewVersion - return nil -} - -// Convert_v1alpha2_ComponentUpgradePlan_To_output_ComponentUpgradePlan is an autogenerated conversion function. -func Convert_v1alpha2_ComponentUpgradePlan_To_output_ComponentUpgradePlan(in *ComponentUpgradePlan, out *output.ComponentUpgradePlan, s conversion.Scope) error { - return autoConvert_v1alpha2_ComponentUpgradePlan_To_output_ComponentUpgradePlan(in, out, s) -} - -func autoConvert_output_ComponentUpgradePlan_To_v1alpha2_ComponentUpgradePlan(in *output.ComponentUpgradePlan, out *ComponentUpgradePlan, s conversion.Scope) error { - out.Name = in.Name - out.CurrentVersion = in.CurrentVersion - out.NewVersion = in.NewVersion - // WARNING: in.NodeName requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha2_Images_To_output_Images(in *Images, out *output.Images, s conversion.Scope) error { - out.Images = *(*[]string)(unsafe.Pointer(&in.Images)) - return nil -} - -// Convert_v1alpha2_Images_To_output_Images is an autogenerated conversion function. -func Convert_v1alpha2_Images_To_output_Images(in *Images, out *output.Images, s conversion.Scope) error { - return autoConvert_v1alpha2_Images_To_output_Images(in, out, s) -} - -func autoConvert_output_Images_To_v1alpha2_Images(in *output.Images, out *Images, s conversion.Scope) error { - out.Images = *(*[]string)(unsafe.Pointer(&in.Images)) - return nil -} - -// Convert_output_Images_To_v1alpha2_Images is an autogenerated conversion function. -func Convert_output_Images_To_v1alpha2_Images(in *output.Images, out *Images, s conversion.Scope) error { - return autoConvert_output_Images_To_v1alpha2_Images(in, out, s) -} - -func autoConvert_v1alpha2_UpgradePlan_To_output_UpgradePlan(in *UpgradePlan, out *output.UpgradePlan, s conversion.Scope) error { - if in.Components != nil { - in, out := &in.Components, &out.Components - *out = make([]output.ComponentUpgradePlan, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_ComponentUpgradePlan_To_output_ComponentUpgradePlan(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Components = nil - } - out.ConfigVersions = *(*[]output.ComponentConfigVersionState)(unsafe.Pointer(&in.ConfigVersions)) - return nil -} - -// Convert_v1alpha2_UpgradePlan_To_output_UpgradePlan is an autogenerated conversion function. -func Convert_v1alpha2_UpgradePlan_To_output_UpgradePlan(in *UpgradePlan, out *output.UpgradePlan, s conversion.Scope) error { - return autoConvert_v1alpha2_UpgradePlan_To_output_UpgradePlan(in, out, s) -} - -func autoConvert_output_UpgradePlan_To_v1alpha2_UpgradePlan(in *output.UpgradePlan, out *UpgradePlan, s conversion.Scope) error { - // WARNING: in.AvailableUpgrades requires manual conversion: does not exist in peer-type - out.ConfigVersions = *(*[]ComponentConfigVersionState)(unsafe.Pointer(&in.ConfigVersions)) - if in.Components != nil { - in, out := &in.Components, &out.Components - *out = make([]ComponentUpgradePlan, len(*in)) - for i := range *in { - if err := Convert_output_ComponentUpgradePlan_To_v1alpha2_ComponentUpgradePlan(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Components = nil - } - return nil -} diff --git a/cmd/kubeadm/app/apis/output/v1alpha2/zz_generated.deepcopy.go b/cmd/kubeadm/app/apis/output/v1alpha2/zz_generated.deepcopy.go deleted file mode 100644 index 73e8c32def2..00000000000 --- a/cmd/kubeadm/app/apis/output/v1alpha2/zz_generated.deepcopy.go +++ /dev/null @@ -1,158 +0,0 @@ -//go:build !ignore_autogenerated -// +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 deepcopy-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BootstrapToken) DeepCopyInto(out *BootstrapToken) { - *out = *in - out.TypeMeta = in.TypeMeta - in.BootstrapToken.DeepCopyInto(&out.BootstrapToken) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapToken. -func (in *BootstrapToken) DeepCopy() *BootstrapToken { - if in == nil { - return nil - } - out := new(BootstrapToken) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BootstrapToken) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComponentConfigVersionState) DeepCopyInto(out *ComponentConfigVersionState) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentConfigVersionState. -func (in *ComponentConfigVersionState) DeepCopy() *ComponentConfigVersionState { - if in == nil { - return nil - } - out := new(ComponentConfigVersionState) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComponentUpgradePlan) DeepCopyInto(out *ComponentUpgradePlan) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentUpgradePlan. -func (in *ComponentUpgradePlan) DeepCopy() *ComponentUpgradePlan { - if in == nil { - return nil - } - out := new(ComponentUpgradePlan) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ComponentUpgradePlan) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Images) DeepCopyInto(out *Images) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Images != nil { - in, out := &in.Images, &out.Images - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Images. -func (in *Images) DeepCopy() *Images { - if in == nil { - return nil - } - out := new(Images) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Images) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UpgradePlan) DeepCopyInto(out *UpgradePlan) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Components != nil { - in, out := &in.Components, &out.Components - *out = make([]ComponentUpgradePlan, len(*in)) - copy(*out, *in) - } - if in.ConfigVersions != nil { - in, out := &in.ConfigVersions, &out.ConfigVersions - *out = make([]ComponentConfigVersionState, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradePlan. -func (in *UpgradePlan) DeepCopy() *UpgradePlan { - if in == nil { - return nil - } - out := new(UpgradePlan) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *UpgradePlan) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/cmd/kubeadm/app/apis/output/v1alpha3/conversion.go b/cmd/kubeadm/app/apis/output/v1alpha3/conversion.go deleted file mode 100644 index 9e6c8b95701..00000000000 --- a/cmd/kubeadm/app/apis/output/v1alpha3/conversion.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2024 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 v1alpha3 - -import ( - "k8s.io/apimachinery/pkg/conversion" - - "k8s.io/kubernetes/cmd/kubeadm/app/apis/output" -) - -// Convert_output_UpgradePlan_To_v1alpha3_UpgradePlan converts a private UpgradePlan to public UpgradePlan. -func Convert_output_UpgradePlan_To_v1alpha3_UpgradePlan(in *output.UpgradePlan, out *UpgradePlan, s conversion.Scope) error { - return autoConvert_output_UpgradePlan_To_v1alpha3_UpgradePlan(in, out, s) -} diff --git a/cmd/kubeadm/app/apis/output/v1alpha3/zz_generated.conversion.go b/cmd/kubeadm/app/apis/output/v1alpha3/zz_generated.conversion.go index 42cc642a3bf..1decf2912f1 100644 --- a/cmd/kubeadm/app/apis/output/v1alpha3/zz_generated.conversion.go +++ b/cmd/kubeadm/app/apis/output/v1alpha3/zz_generated.conversion.go @@ -111,7 +111,7 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*output.UpgradePlan)(nil), (*UpgradePlan)(nil), func(a, b interface{}, scope conversion.Scope) error { + if err := s.AddGeneratedConversionFunc((*output.UpgradePlan)(nil), (*UpgradePlan)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_output_UpgradePlan_To_v1alpha3_UpgradePlan(a.(*output.UpgradePlan), b.(*UpgradePlan), scope) }); err != nil { return err @@ -299,6 +299,10 @@ func Convert_v1alpha3_UpgradePlan_To_output_UpgradePlan(in *UpgradePlan, out *ou func autoConvert_output_UpgradePlan_To_v1alpha3_UpgradePlan(in *output.UpgradePlan, out *UpgradePlan, s conversion.Scope) error { out.AvailableUpgrades = *(*[]AvailableUpgrade)(unsafe.Pointer(&in.AvailableUpgrades)) out.ConfigVersions = *(*[]ComponentConfigVersionState)(unsafe.Pointer(&in.ConfigVersions)) - // WARNING: in.Components requires manual conversion: does not exist in peer-type return nil } + +// Convert_output_UpgradePlan_To_v1alpha3_UpgradePlan is an autogenerated conversion function. +func Convert_output_UpgradePlan_To_v1alpha3_UpgradePlan(in *output.UpgradePlan, out *UpgradePlan, s conversion.Scope) error { + return autoConvert_output_UpgradePlan_To_v1alpha3_UpgradePlan(in, out, s) +} diff --git a/cmd/kubeadm/app/apis/output/zz_generated.deepcopy.go b/cmd/kubeadm/app/apis/output/zz_generated.deepcopy.go index 59d191243cc..de61c770be8 100644 --- a/cmd/kubeadm/app/apis/output/zz_generated.deepcopy.go +++ b/cmd/kubeadm/app/apis/output/zz_generated.deepcopy.go @@ -224,11 +224,6 @@ func (in *UpgradePlan) DeepCopyInto(out *UpgradePlan) { *out = make([]ComponentConfigVersionState, len(*in)) copy(*out, *in) } - if in.Components != nil { - in, out := &in.Components, &out.Components - *out = make([]ComponentUpgradePlan, len(*in)) - copy(*out, *in) - } return }