From 03b55b959637a948a779debeeccf9da5038215f8 Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Mon, 27 Feb 2023 05:17:51 +0100 Subject: [PATCH] Add template metadata to CABPK and KCP types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- bootstrap/kubeadm/api/v1alpha3/conversion.go | 7 +++ .../api/v1alpha3/zz_generated.conversion.go | 16 +++---- bootstrap/kubeadm/api/v1alpha4/conversion.go | 7 +++ .../api/v1alpha4/zz_generated.conversion.go | 16 +++---- .../v1beta1/kubeadmconfigtemplate_types.go | 7 +++ .../api/v1beta1/zz_generated.deepcopy.go | 1 + ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 21 +++++++++ .../kubeadm/api/v1alpha4/conversion.go | 10 +++++ .../api/v1alpha4/zz_generated.conversion.go | 16 +++---- .../kubeadmcontrolplanetemplate_types.go | 11 +++++ .../api/v1beta1/zz_generated.deepcopy.go | 2 + ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 43 +++++++++++++++++++ 12 files changed, 127 insertions(+), 30 deletions(-) diff --git a/bootstrap/kubeadm/api/v1alpha3/conversion.go b/bootstrap/kubeadm/api/v1alpha3/conversion.go index 5a73bb04045d..12e4c657c1d1 100644 --- a/bootstrap/kubeadm/api/v1alpha3/conversion.go +++ b/bootstrap/kubeadm/api/v1alpha3/conversion.go @@ -147,6 +147,8 @@ func (src *KubeadmConfigTemplate) ConvertTo(dstRaw conversion.Hub) error { } } + dst.Spec.Template.ObjectMeta = restored.Spec.Template.ObjectMeta + if restored.Spec.Template.Spec.JoinConfiguration != nil && restored.Spec.Template.Spec.JoinConfiguration.NodeRegistration.IgnorePreflightErrors != nil { if dst.Spec.Template.Spec.JoinConfiguration == nil { dst.Spec.Template.Spec.JoinConfiguration = &bootstrapv1.JoinConfiguration{} @@ -275,3 +277,8 @@ func Convert_v1beta1_User_To_v1alpha3_User(in *bootstrapv1.User, out *User, s ap // User.PasswdFrom does not exist in kubeadm v1alpha3 API. return autoConvert_v1beta1_User_To_v1alpha3_User(in, out, s) } + +func Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(in *bootstrapv1.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s apiconversion.Scope) error { + // KubeadmConfigTemplateResource.metadata does not exist in kubeadm v1alpha3. + return autoConvert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(in, out, s) +} diff --git a/bootstrap/kubeadm/api/v1alpha3/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha3/zz_generated.conversion.go index fc65c2447971..74e58bc35881 100644 --- a/bootstrap/kubeadm/api/v1alpha3/zz_generated.conversion.go +++ b/bootstrap/kubeadm/api/v1alpha3/zz_generated.conversion.go @@ -129,11 +129,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigTemplateResource)(nil), (*KubeadmConfigTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(a.(*v1beta1.KubeadmConfigTemplateResource), b.(*KubeadmConfigTemplateResource), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplateSpec)(nil), (*v1beta1.KubeadmConfigTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha3_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(a.(*KubeadmConfigTemplateSpec), b.(*v1beta1.KubeadmConfigTemplateSpec), scope) }); err != nil { @@ -224,6 +219,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*v1beta1.KubeadmConfigTemplateResource)(nil), (*KubeadmConfigTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(a.(*v1beta1.KubeadmConfigTemplateResource), b.(*KubeadmConfigTemplateResource), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*v1beta1.User)(nil), (*User)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_User_To_v1alpha3_User(a.(*v1beta1.User), b.(*User), scope) }); err != nil { @@ -665,17 +665,13 @@ func Convert_v1alpha3_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemp } func autoConvert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(in *v1beta1.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s conversion.Scope) error { + // WARNING: in.ObjectMeta requires manual conversion: does not exist in peer-type if err := Convert_v1beta1_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource is an autogenerated conversion function. -func Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(in *v1beta1.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s conversion.Scope) error { - return autoConvert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(in, out, s) -} - func autoConvert_v1alpha3_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(in *KubeadmConfigTemplateSpec, out *v1beta1.KubeadmConfigTemplateSpec, s conversion.Scope) error { if err := Convert_v1alpha3_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(&in.Template, &out.Template, s); err != nil { return err diff --git a/bootstrap/kubeadm/api/v1alpha4/conversion.go b/bootstrap/kubeadm/api/v1alpha4/conversion.go index bd3074d27964..576fceebdf3f 100644 --- a/bootstrap/kubeadm/api/v1alpha4/conversion.go +++ b/bootstrap/kubeadm/api/v1alpha4/conversion.go @@ -127,6 +127,8 @@ func (src *KubeadmConfigTemplate) ConvertTo(dstRaw conversion.Hub) error { } } + dst.Spec.Template.ObjectMeta = restored.Spec.Template.ObjectMeta + dst.Spec.Template.Spec.Ignition = restored.Spec.Template.Spec.Ignition if restored.Spec.Template.Spec.InitConfiguration != nil { if dst.Spec.Template.Spec.InitConfiguration == nil { @@ -213,3 +215,8 @@ func Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions // kubeadm v1alpha4 API. return autoConvert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in, out, s) } + +func Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(in *bootstrapv1.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s apiconversion.Scope) error { + // KubeadmConfigTemplateResource.metadata does not exist in kubeadm v1alpha4. + return autoConvert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(in, out, s) +} diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go index 1ff8a4fafe07..bcc2c3a8cd72 100644 --- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go +++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go @@ -305,11 +305,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigTemplateResource)(nil), (*KubeadmConfigTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(a.(*v1beta1.KubeadmConfigTemplateResource), b.(*KubeadmConfigTemplateResource), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplateSpec)(nil), (*v1beta1.KubeadmConfigTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha4_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(a.(*KubeadmConfigTemplateSpec), b.(*v1beta1.KubeadmConfigTemplateSpec), scope) }); err != nil { @@ -400,6 +395,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*v1beta1.KubeadmConfigTemplateResource)(nil), (*KubeadmConfigTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(a.(*v1beta1.KubeadmConfigTemplateResource), b.(*KubeadmConfigTemplateResource), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*v1beta1.NodeRegistrationOptions)(nil), (*NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(a.(*v1beta1.NodeRegistrationOptions), b.(*NodeRegistrationOptions), scope) }); err != nil { @@ -1322,17 +1322,13 @@ func Convert_v1alpha4_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemp } func autoConvert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(in *v1beta1.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s conversion.Scope) error { + // WARNING: in.ObjectMeta requires manual conversion: does not exist in peer-type if err := Convert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource is an autogenerated conversion function. -func Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(in *v1beta1.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s conversion.Scope) error { - return autoConvert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(in, out, s) -} - func autoConvert_v1alpha4_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(in *KubeadmConfigTemplateSpec, out *v1beta1.KubeadmConfigTemplateSpec, s conversion.Scope) error { if err := Convert_v1alpha4_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(&in.Template, &out.Template, s); err != nil { return err diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go index 33ceb0567884..47e5691e16a9 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go @@ -18,6 +18,8 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // KubeadmConfigTemplateSpec defines the desired state of KubeadmConfigTemplate. @@ -27,6 +29,11 @@ type KubeadmConfigTemplateSpec struct { // KubeadmConfigTemplateResource defines the Template structure. type KubeadmConfigTemplateResource struct { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` + Spec KubeadmConfigSpec `json:"spec,omitempty"` } diff --git a/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go index 403c76830611..588c218d2d4a 100644 --- a/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go +++ b/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go @@ -841,6 +841,7 @@ func (in *KubeadmConfigTemplateList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeadmConfigTemplateResource) DeepCopyInto(out *KubeadmConfigTemplateResource) { *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) } diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml index 70f7cceb5eaf..abad81720568 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml @@ -2005,6 +2005,27 @@ spec: template: description: KubeadmConfigTemplateResource defines the Template structure. properties: + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map + stored with a resource that may be set by external tools + to store and retrieve arbitrary metadata. They are not queryable + and should be preserved when modifying objects. More info: + http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used + to organize and categorize (scope and select) objects. May + match selectors of replication controllers and services. + More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object spec: description: KubeadmConfigSpec defines the desired state of KubeadmConfig. Either ClusterConfiguration and InitConfiguration should be diff --git a/controlplane/kubeadm/api/v1alpha4/conversion.go b/controlplane/kubeadm/api/v1alpha4/conversion.go index 1637b272a82c..43c83dc97cff 100644 --- a/controlplane/kubeadm/api/v1alpha4/conversion.go +++ b/controlplane/kubeadm/api/v1alpha4/conversion.go @@ -143,6 +143,11 @@ func (src *KubeadmControlPlaneTemplate) ConvertTo(dstRaw conversion.Hub) error { } } + dst.Spec.Template.ObjectMeta = restored.Spec.Template.ObjectMeta + if restored.Spec.Template.Spec.MachineTemplate != nil { + dst.Spec.Template.Spec.MachineTemplate.ObjectMeta = restored.Spec.Template.Spec.MachineTemplate.ObjectMeta + } + if restored.Spec.Template.Spec.KubeadmConfigSpec.InitConfiguration != nil { if dst.Spec.Template.Spec.KubeadmConfigSpec.InitConfiguration == nil { dst.Spec.Template.Spec.KubeadmConfigSpec.InitConfiguration = &bootstrapv1.InitConfiguration{} @@ -281,3 +286,8 @@ func Convert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneSt // .LastRemediation was added in v1beta1. return autoConvert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus(in, out, scope) } + +func Convert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(in *controlplanev1.KubeadmControlPlaneTemplateResource, out *KubeadmControlPlaneTemplateResource, scope apiconversion.Scope) error { + // .metadata and .spec.machineTemplate.metadata was added in v1beta1. + return autoConvert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(in, out, scope) +} diff --git a/controlplane/kubeadm/api/v1alpha4/zz_generated.conversion.go b/controlplane/kubeadm/api/v1alpha4/zz_generated.conversion.go index efe50a58635e..43a665833f86 100644 --- a/controlplane/kubeadm/api/v1alpha4/zz_generated.conversion.go +++ b/controlplane/kubeadm/api/v1alpha4/zz_generated.conversion.go @@ -102,11 +102,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlaneTemplateResource)(nil), (*KubeadmControlPlaneTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(a.(*v1beta1.KubeadmControlPlaneTemplateResource), b.(*KubeadmControlPlaneTemplateResource), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneTemplateSpec)(nil), (*v1beta1.KubeadmControlPlaneTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha4_KubeadmControlPlaneTemplateSpec_To_v1beta1_KubeadmControlPlaneTemplateSpec(a.(*KubeadmControlPlaneTemplateSpec), b.(*v1beta1.KubeadmControlPlaneTemplateSpec), scope) }); err != nil { @@ -162,6 +157,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*v1beta1.KubeadmControlPlaneTemplateResource)(nil), (*KubeadmControlPlaneTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(a.(*v1beta1.KubeadmControlPlaneTemplateResource), b.(*KubeadmControlPlaneTemplateResource), scope) + }); err != nil { + return err + } return nil } @@ -438,17 +438,13 @@ func Convert_v1alpha4_KubeadmControlPlaneTemplateResource_To_v1beta1_KubeadmCont } func autoConvert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(in *v1beta1.KubeadmControlPlaneTemplateResource, out *KubeadmControlPlaneTemplateResource, s conversion.Scope) error { + // WARNING: in.ObjectMeta requires manual conversion: does not exist in peer-type if err := Convert_v1beta1_KubeadmControlPlaneTemplateResourceSpec_To_v1alpha4_KubeadmControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource is an autogenerated conversion function. -func Convert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(in *v1beta1.KubeadmControlPlaneTemplateResource, out *KubeadmControlPlaneTemplateResource, s conversion.Scope) error { - return autoConvert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(in, out, s) -} - func autoConvert_v1alpha4_KubeadmControlPlaneTemplateSpec_To_v1beta1_KubeadmControlPlaneTemplateSpec(in *KubeadmControlPlaneTemplateSpec, out *v1beta1.KubeadmControlPlaneTemplateSpec, s conversion.Scope) error { if err := Convert_v1alpha4_KubeadmControlPlaneTemplateResource_To_v1beta1_KubeadmControlPlaneTemplateResource(&in.Template, &out.Template, s); err != nil { return err diff --git a/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go index 9fab688e84f7..69a1541d0397 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go @@ -19,6 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" ) @@ -55,6 +56,11 @@ func init() { // KubeadmControlPlaneTemplateResource describes the data needed to create a KubeadmControlPlane from a template. type KubeadmControlPlaneTemplateResource struct { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` + Spec KubeadmControlPlaneTemplateResourceSpec `json:"spec"` } @@ -104,6 +110,11 @@ type KubeadmControlPlaneTemplateResourceSpec struct { // because they are calculated by the Cluster topology reconciler during reconciliation and thus cannot // be configured on the KubeadmControlPlaneTemplate. type KubeadmControlPlaneTemplateMachineTemplate struct { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` + // NodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` diff --git a/controlplane/kubeadm/api/v1beta1/zz_generated.deepcopy.go b/controlplane/kubeadm/api/v1beta1/zz_generated.deepcopy.go index 5d6d56bccd09..ae9633f16c89 100644 --- a/controlplane/kubeadm/api/v1beta1/zz_generated.deepcopy.go +++ b/controlplane/kubeadm/api/v1beta1/zz_generated.deepcopy.go @@ -258,6 +258,7 @@ func (in *KubeadmControlPlaneTemplateList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeadmControlPlaneTemplateMachineTemplate) DeepCopyInto(out *KubeadmControlPlaneTemplateMachineTemplate) { *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if in.NodeDrainTimeout != nil { in, out := &in.NodeDrainTimeout, &out.NodeDrainTimeout *out = new(v1.Duration) @@ -288,6 +289,7 @@ func (in *KubeadmControlPlaneTemplateMachineTemplate) DeepCopy() *KubeadmControl // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeadmControlPlaneTemplateResource) DeepCopyInto(out *KubeadmControlPlaneTemplateResource) { *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) } diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml index bd86496b27a9..39c10a4e0f0e 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml @@ -1207,6 +1207,27 @@ spec: description: KubeadmControlPlaneTemplateResource describes the data needed to create a KubeadmControlPlane from a template. properties: + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map + stored with a resource that may be set by external tools + to store and retrieve arbitrary metadata. They are not queryable + and should be preserved when modifying objects. More info: + http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used + to organize and categorize (scope and select) objects. May + match selectors of replication controllers and services. + More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object spec: description: 'KubeadmControlPlaneTemplateResourceSpec defines the desired state of KubeadmControlPlane. NOTE: KubeadmControlPlaneTemplateResourceSpec @@ -2357,6 +2378,28 @@ spec: machines should be shaped when creating or updating a control plane. properties: + metadata: + description: 'Standard object''s metadata. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value + map stored with a resource that may be set by external + tools to store and retrieve arbitrary metadata. + They are not queryable and should be preserved when + modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can + be used to organize and categorize (scope and select) + objects. May match selectors of replication controllers + and services. More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object nodeDeletionTimeout: description: NodeDeletionTimeout defines how long the machine controller will attempt to delete the Node that