Skip to content

Commit 393485e

Browse files
⚠️ remove TypeMeta from KubeadmConfigSpec (#12350)
* Remove TypeMeta from KubeadmConfig spec * Fix autogenerated files * Address comments
1 parent 47503f5 commit 393485e

28 files changed

+325
-399
lines changed

api/bootstrap/kubeadm/v1beta1/conversion.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,14 @@ func Convert_v1beta1_BootstrapToken_To_v1beta2_BootstrapToken(in *BootstrapToken
312312
return nil
313313
}
314314

315+
func Convert_v1beta1_InitConfiguration_To_v1beta2_InitConfiguration(in *InitConfiguration, out *bootstrapv1.InitConfiguration, s apimachineryconversion.Scope) error {
316+
return autoConvert_v1beta1_InitConfiguration_To_v1beta2_InitConfiguration(in, out, s)
317+
}
318+
319+
func Convert_v1beta1_JoinConfiguration_To_v1beta2_JoinConfiguration(in *JoinConfiguration, out *bootstrapv1.JoinConfiguration, s apimachineryconversion.Scope) error {
320+
return autoConvert_v1beta1_JoinConfiguration_To_v1beta2_JoinConfiguration(in, out, s)
321+
}
322+
315323
// Implement local conversion func because conversion-gen is not aware of conversion func in other packages (see https://github.com/kubernetes/code-generator/issues/94)
316324

317325
func Convert_v1beta1_ObjectMeta_To_v1beta2_ObjectMeta(in *clusterv1beta1.ObjectMeta, out *clusterv1.ObjectMeta, s apimachineryconversion.Scope) error {

api/bootstrap/kubeadm/v1beta1/zz_generated.conversion.go

Lines changed: 13 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/bootstrap/kubeadm/v1beta2/kubeadm_types.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,9 @@ const (
7272
KubeadmConfigDataSecretNotAvailableReason = clusterv1.NotAvailableReason
7373
)
7474

75-
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
76-
7775
// InitConfiguration contains a list of elements that is specific "kubeadm init"-only runtime
7876
// information.
7977
type InitConfiguration struct {
80-
metav1.TypeMeta `json:",inline"`
81-
8278
// bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create.
8379
// This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature
8480
// +optional
@@ -119,12 +115,8 @@ type InitConfiguration struct {
119115
Timeouts *Timeouts `json:"timeouts,omitempty"`
120116
}
121117

122-
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
123-
124118
// ClusterConfiguration contains cluster-wide configuration for a kubeadm cluster.
125119
type ClusterConfiguration struct {
126-
metav1.TypeMeta `json:",inline"`
127-
128120
// etcd holds configuration for etcd.
129121
// NB: This value defaults to a Local (stacked) etcd
130122
// +optional
@@ -494,12 +486,8 @@ type ExternalEtcd struct {
494486
KeyFile string `json:"keyFile"`
495487
}
496488

497-
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
498-
499489
// JoinConfiguration contains elements describing a particular node.
500490
type JoinConfiguration struct {
501-
metav1.TypeMeta `json:",inline"`
502-
503491
// nodeRegistration holds fields that relate to registering the new control-plane node to the cluster.
504492
// When used in the context of control plane nodes, NodeRegistration should remain consistent
505493
// across both InitConfiguration and JoinConfiguration

api/bootstrap/kubeadm/v1beta2/zz_generated.deepcopy.go

Lines changed: 0 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml

Lines changed: 0 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)