From eb88bf0b56c94be6ad1138aa3d30b6e0947fc893 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Tue, 23 Nov 2021 15:02:22 +0200 Subject: [PATCH 01/40] feat: add flag for container logs max size --- pkg/cmd/apply.go | 14 +++++++++++--- pkg/state/context.go | 1 + pkg/templates/kubeadm/v1beta2/kubeadm.go | 18 ++++++++++-------- pkg/templates/kubeadm/v1beta3/kubeadm.go | 18 ++++++++++-------- 4 files changed, 32 insertions(+), 19 deletions(-) diff --git a/pkg/cmd/apply.go b/pkg/cmd/apply.go index 50ed09271..2602d57a5 100644 --- a/pkg/cmd/apply.go +++ b/pkg/cmd/apply.go @@ -40,9 +40,10 @@ type applyOpts struct { globalOptions AutoApprove bool `longflag:"auto-approve" shortflag:"y"` // Install flags - BackupFile string `longflag:"backup" shortflag:"b"` - NoInit bool `longflag:"no-init"` - ForceInstall bool `longflag:"force-install"` + BackupFile string `longflag:"backup" shortflag:"b"` + NoInit bool `longflag:"no-init"` + ForceInstall bool `longflag:"force-install"` + ContainerLogsMaxSize string `longflag:"container-logs-max-size"` // Upgrade flags ForceUpgrade bool `longflag:"force-upgrade"` UpgradeMachineDeployments bool `longflag:"upgrade-machine-deployments"` @@ -57,6 +58,7 @@ func (opts *applyOpts) BuildState() (*state.State, error) { } s.BackupFile = opts.BackupFile + s.ContainerLogsMaxSize = opts.ContainerLogsMaxSize s.ForceInstall = opts.ForceInstall s.ForceUpgrade = opts.ForceUpgrade s.UpgradeMachineDeployments = opts.UpgradeMachineDeployments @@ -163,6 +165,12 @@ func applyCmd(rootFlags *pflag.FlagSet) *cobra.Command { false, "rotate Encryption Provider encryption key") + cmd.Flags().StringVar( + &opts.ContainerLogsMaxSize, + longFlagName(opts, "ContainerLogsMaxSize"), + "10Mi", + "set the max size of container logs (e.g. 50Mi)") + return cmd } diff --git a/pkg/state/context.go b/pkg/state/context.go index 134f2aa4a..dfd93d80b 100644 --- a/pkg/state/context.go +++ b/pkg/state/context.go @@ -103,6 +103,7 @@ type State struct { CredentialsFilePath string ManifestFilePath string PauseImage string + ContainerLogsMaxSize string } func (s *State) KubeadmVerboseFlag() string { diff --git a/pkg/templates/kubeadm/v1beta2/kubeadm.go b/pkg/templates/kubeadm/v1beta2/kubeadm.go index 4e3b78f97..0850c9ff7 100644 --- a/pkg/templates/kubeadm/v1beta2/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta2/kubeadm.go @@ -166,10 +166,11 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + ContainerLogMaxSize: s.ContainerLogsMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -357,10 +358,11 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + ContainerLogMaxSize: s.ContainerLogsMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, diff --git a/pkg/templates/kubeadm/v1beta3/kubeadm.go b/pkg/templates/kubeadm/v1beta3/kubeadm.go index 3dffb2c44..98df55afa 100644 --- a/pkg/templates/kubeadm/v1beta3/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta3/kubeadm.go @@ -166,10 +166,11 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + ContainerLogMaxSize: s.ContainerLogsMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -357,10 +358,11 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + ContainerLogMaxSize: s.ContainerLogsMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, From f2f07eb1548018551fdcbadd83bd6fd74fa5ffcc Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 24 Nov 2021 13:20:26 +0200 Subject: [PATCH 02/40] feat: remove container log max size flag add it the kubeone api --- pkg/apis/kubeone/types.go | 2 ++ pkg/apis/kubeone/v1alpha1/types.go | 2 ++ pkg/apis/kubeone/v1alpha1/zz_generated.deepcopy.go | 1 - pkg/apis/kubeone/v1alpha1/zz_generated.defaults.go | 1 - pkg/apis/kubeone/v1beta1/types.go | 2 ++ .../kubeone/v1beta1/zz_generated.conversion.go | 3 ++- pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go | 1 - pkg/apis/kubeone/v1beta1/zz_generated.defaults.go | 1 - pkg/apis/kubeone/zz_generated.deepcopy.go | 1 - pkg/cmd/apply.go | 14 +++----------- pkg/cmd/config.go | 5 +++++ pkg/state/context.go | 1 - pkg/templates/kubeadm/v1beta2/kubeadm.go | 4 ++-- pkg/templates/kubeadm/v1beta3/kubeadm.go | 4 ++-- 14 files changed, 20 insertions(+), 22 deletions(-) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index 6c0474744..cdbd63e93 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -63,6 +63,8 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` + // ContainerLogsMaxSize is the maximum size of container logs in bytes. Defaults to 10MB. + ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty" default:"10Mi"` } // ContainerRuntimeConfig diff --git a/pkg/apis/kubeone/v1alpha1/types.go b/pkg/apis/kubeone/v1alpha1/types.go index 6679aad83..0f52a1e5c 100644 --- a/pkg/apis/kubeone/v1alpha1/types.go +++ b/pkg/apis/kubeone/v1alpha1/types.go @@ -57,6 +57,8 @@ type KubeOneCluster struct { SystemPackages *SystemPackages `json:"systemPackages,omitempty"` // Credentials used for machine-controller and external CCM Credentials map[string]string `json:"credentials,omitempty"` + // ContainerLogsMaxSize is the maximum size of container logs in bytes. Defaults to 10MB. + ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty" default:"10Mi"` } // HostConfig describes a single control plane node. diff --git a/pkg/apis/kubeone/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/kubeone/v1alpha1/zz_generated.deepcopy.go index 26ba9c518..40302ecf2 100644 --- a/pkg/apis/kubeone/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/v1alpha1/zz_generated.deepcopy.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/apis/kubeone/v1alpha1/zz_generated.defaults.go b/pkg/apis/kubeone/v1alpha1/zz_generated.defaults.go index c475bfed8..a24f32a7d 100644 --- a/pkg/apis/kubeone/v1alpha1/zz_generated.defaults.go +++ b/pkg/apis/kubeone/v1alpha1/zz_generated.defaults.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/apis/kubeone/v1beta1/types.go b/pkg/apis/kubeone/v1beta1/types.go index 089f83111..1892e75a6 100644 --- a/pkg/apis/kubeone/v1beta1/types.go +++ b/pkg/apis/kubeone/v1beta1/types.go @@ -63,6 +63,8 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` + // ContainerLogsMaxSize is the maximum size of container logs. Defaults to 10MB. + ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty"` } // ContainerRuntimeConfig diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go index ebb932ff5..4aecf1daa 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated /* @@ -1337,6 +1336,7 @@ func autoConvert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneClu return err } out.RegistryConfiguration = (*kubeone.RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) + out.ContainerLogsMaxSize = in.ContainerLogsMaxSize return nil } @@ -1383,6 +1383,7 @@ func autoConvert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in *kubeone.Ku return err } out.RegistryConfiguration = (*RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) + out.ContainerLogsMaxSize = in.ContainerLogsMaxSize return nil } diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go index c366ad081..015ac145f 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.defaults.go b/pkg/apis/kubeone/v1beta1/zz_generated.defaults.go index dfebd51d7..f3c17be2c 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.defaults.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.defaults.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/apis/kubeone/zz_generated.deepcopy.go b/pkg/apis/kubeone/zz_generated.deepcopy.go index f87a8cfb5..77741bbc0 100644 --- a/pkg/apis/kubeone/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/zz_generated.deepcopy.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/cmd/apply.go b/pkg/cmd/apply.go index 2602d57a5..50ed09271 100644 --- a/pkg/cmd/apply.go +++ b/pkg/cmd/apply.go @@ -40,10 +40,9 @@ type applyOpts struct { globalOptions AutoApprove bool `longflag:"auto-approve" shortflag:"y"` // Install flags - BackupFile string `longflag:"backup" shortflag:"b"` - NoInit bool `longflag:"no-init"` - ForceInstall bool `longflag:"force-install"` - ContainerLogsMaxSize string `longflag:"container-logs-max-size"` + BackupFile string `longflag:"backup" shortflag:"b"` + NoInit bool `longflag:"no-init"` + ForceInstall bool `longflag:"force-install"` // Upgrade flags ForceUpgrade bool `longflag:"force-upgrade"` UpgradeMachineDeployments bool `longflag:"upgrade-machine-deployments"` @@ -58,7 +57,6 @@ func (opts *applyOpts) BuildState() (*state.State, error) { } s.BackupFile = opts.BackupFile - s.ContainerLogsMaxSize = opts.ContainerLogsMaxSize s.ForceInstall = opts.ForceInstall s.ForceUpgrade = opts.ForceUpgrade s.UpgradeMachineDeployments = opts.UpgradeMachineDeployments @@ -165,12 +163,6 @@ func applyCmd(rootFlags *pflag.FlagSet) *cobra.Command { false, "rotate Encryption Provider encryption key") - cmd.Flags().StringVar( - &opts.ContainerLogsMaxSize, - longFlagName(opts, "ContainerLogsMaxSize"), - "10Mi", - "set the max size of container logs (e.g. 50Mi)") - return cmd } diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index 2afd55beb..c36e84c4b 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -288,6 +288,8 @@ func createAndPrintManifest(printOptions *printOpts) error { // Version cfg.Set(yamled.Path{"versions", "kubernetes"}, printOptions.KubernetesVersion) + // Container Logs Max Size + cfg.Set(yamled.Path{"containerLogsMaxSize"}, "10Mi") // Provider var providerVal struct{} @@ -500,9 +502,12 @@ apiVersion: kubeone.io/v1beta1 kind: KubeOneCluster name: {{ .ClusterName }} + versions: kubernetes: "{{ .KubernetesVersion }}" +containerLogsMaxSize: "10Mi" + clusterNetwork: # the subnet used for pods (default: 10.244.0.0/16) podSubnet: "{{ .PodSubnet }}" diff --git a/pkg/state/context.go b/pkg/state/context.go index dfd93d80b..134f2aa4a 100644 --- a/pkg/state/context.go +++ b/pkg/state/context.go @@ -103,7 +103,6 @@ type State struct { CredentialsFilePath string ManifestFilePath string PauseImage string - ContainerLogsMaxSize string } func (s *State) KubeadmVerboseFlag() string { diff --git a/pkg/templates/kubeadm/v1beta2/kubeadm.go b/pkg/templates/kubeadm/v1beta2/kubeadm.go index 0850c9ff7..5a196cd9b 100644 --- a/pkg/templates/kubeadm/v1beta2/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta2/kubeadm.go @@ -170,7 +170,7 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: s.ContainerLogsMaxSize, + ContainerLogMaxSize: cluster.ContainerLogsMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -362,7 +362,7 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: s.ContainerLogsMaxSize, + ContainerLogMaxSize: cluster.ContainerLogsMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, diff --git a/pkg/templates/kubeadm/v1beta3/kubeadm.go b/pkg/templates/kubeadm/v1beta3/kubeadm.go index 98df55afa..49f438435 100644 --- a/pkg/templates/kubeadm/v1beta3/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta3/kubeadm.go @@ -170,7 +170,7 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: s.ContainerLogsMaxSize, + ContainerLogMaxSize: cluster.ContainerLogsMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -362,7 +362,7 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: s.ContainerLogsMaxSize, + ContainerLogMaxSize: cluster.ContainerLogsMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, From 15974e97f9b782f696067b18e1015fad86b87331 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 24 Nov 2021 13:28:58 +0200 Subject: [PATCH 03/40] chore: update value of the container logs constructor --- pkg/apis/kubeone/types.go | 2 +- pkg/apis/kubeone/v1alpha1/types.go | 2 +- pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index cdbd63e93..d8a522592 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -64,7 +64,7 @@ type KubeOneCluster struct { // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` // ContainerLogsMaxSize is the maximum size of container logs in bytes. Defaults to 10MB. - ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty" default:"10Mi"` + ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty"` } // ContainerRuntimeConfig diff --git a/pkg/apis/kubeone/v1alpha1/types.go b/pkg/apis/kubeone/v1alpha1/types.go index 0f52a1e5c..a72b82692 100644 --- a/pkg/apis/kubeone/v1alpha1/types.go +++ b/pkg/apis/kubeone/v1alpha1/types.go @@ -58,7 +58,7 @@ type KubeOneCluster struct { // Credentials used for machine-controller and external CCM Credentials map[string]string `json:"credentials,omitempty"` // ContainerLogsMaxSize is the maximum size of container logs in bytes. Defaults to 10MB. - ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty" default:"10Mi"` + ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty"` } // HostConfig describes a single control plane node. diff --git a/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go b/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go index fa762dd54..8038a217f 100644 --- a/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated /* @@ -498,7 +497,7 @@ func autoConvert_kubeone_HostConfig_To_v1alpha1_HostConfig(in *kubeone.HostConfi func autoConvert_v1alpha1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneCluster, out *kubeone.KubeOneCluster, s conversion.Scope) error { out.Name = in.Name // WARNING: in.Hosts requires manual conversion: does not exist in peer-type - // WARNING: in.StaticWorkers requires manual conversion: inconvertible types ([]k8c.io/kubeone/pkg/apis/kubeone/v1alpha1.HostConfig vs k8c.io/kubeone/pkg/apis/kubeone.StaticWorkersConfig) + // WARNING: in.StaticWorkers requires manual conversion: inconvertible types ([]github.com/nerdeveloper/kubeone/pkg/apis/kubeone/v1alpha1.HostConfig vs k8c.io/kubeone/pkg/apis/kubeone.StaticWorkersConfig) if err := Convert_v1alpha1_APIEndpoint_To_kubeone_APIEndpoint(&in.APIEndpoint, &out.APIEndpoint, s); err != nil { return err } @@ -538,6 +537,7 @@ func autoConvert_v1alpha1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneCl } out.SystemPackages = (*kubeone.SystemPackages)(unsafe.Pointer(in.SystemPackages)) // WARNING: in.Credentials requires manual conversion: does not exist in peer-type + out.ContainerLogsMaxSize = in.ContainerLogsMaxSize return nil } @@ -560,7 +560,7 @@ func autoConvert_kubeone_KubeOneCluster_To_v1alpha1_KubeOneCluster(in *kubeone.K if err := Convert_kubeone_ProxyConfig_To_v1alpha1_ProxyConfig(&in.Proxy, &out.Proxy, s); err != nil { return err } - // WARNING: in.StaticWorkers requires manual conversion: inconvertible types (k8c.io/kubeone/pkg/apis/kubeone.StaticWorkersConfig vs []k8c.io/kubeone/pkg/apis/kubeone/v1alpha1.HostConfig) + // WARNING: in.StaticWorkers requires manual conversion: inconvertible types (k8c.io/kubeone/pkg/apis/kubeone.StaticWorkersConfig vs []github.com/nerdeveloper/kubeone/pkg/apis/kubeone/v1alpha1.HostConfig) // WARNING: in.DynamicWorkers requires manual conversion: does not exist in peer-type if in.MachineController != nil { in, out := &in.MachineController, &out.MachineController @@ -587,6 +587,7 @@ func autoConvert_kubeone_KubeOneCluster_To_v1alpha1_KubeOneCluster(in *kubeone.K out.SystemPackages = (*SystemPackages)(unsafe.Pointer(in.SystemPackages)) // WARNING: in.AssetConfiguration requires manual conversion: does not exist in peer-type // WARNING: in.RegistryConfiguration requires manual conversion: does not exist in peer-type + out.ContainerLogsMaxSize = in.ContainerLogsMaxSize return nil } From aa4bf834dd88ebdb01e035340405b14561c9596f Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 24 Nov 2021 13:30:18 +0200 Subject: [PATCH 04/40] chore: update --- pkg/apis/kubeone/types.go | 2 +- pkg/apis/kubeone/v1alpha1/types.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index d8a522592..e43dc04e0 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -63,7 +63,7 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` - // ContainerLogsMaxSize is the maximum size of container logs in bytes. Defaults to 10MB. + // ContainerLogsMaxSize is the maximum size of container logs. Defaults to 10MB. ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty"` } diff --git a/pkg/apis/kubeone/v1alpha1/types.go b/pkg/apis/kubeone/v1alpha1/types.go index a72b82692..a1fc4582e 100644 --- a/pkg/apis/kubeone/v1alpha1/types.go +++ b/pkg/apis/kubeone/v1alpha1/types.go @@ -57,7 +57,7 @@ type KubeOneCluster struct { SystemPackages *SystemPackages `json:"systemPackages,omitempty"` // Credentials used for machine-controller and external CCM Credentials map[string]string `json:"credentials,omitempty"` - // ContainerLogsMaxSize is the maximum size of container logs in bytes. Defaults to 10MB. + // ContainerLogsMaxSize is the maximum size of container logs. Defaults to 10MB. ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty"` } From f069eb1c3c9e50527a1e649607e5507e3bfa8c0c Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Thu, 25 Nov 2021 13:59:54 +0200 Subject: [PATCH 05/40] refactor: add kubeconfig object to the kubeone API to support kubelet configurations --- pkg/apis/kubeone/types.go | 11 ++++-- pkg/apis/kubeone/v1alpha1/types.go | 2 - .../v1alpha1/zz_generated.conversion.go | 3 +- pkg/apis/kubeone/v1beta1/types.go | 10 ++++- .../v1beta1/zz_generated.conversion.go | 38 ++++++++++++++++++- .../kubeone/v1beta1/zz_generated.deepcopy.go | 17 +++++++++ pkg/apis/kubeone/zz_generated.deepcopy.go | 17 +++++++++ pkg/cmd/config.go | 18 ++++++--- pkg/templates/kubeadm/v1beta2/kubeadm.go | 12 +++++- pkg/templates/kubeadm/v1beta3/kubeadm.go | 15 +++++++- 10 files changed, 122 insertions(+), 21 deletions(-) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index e43dc04e0..d97205f9f 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -18,7 +18,6 @@ package kubeone import ( "encoding/json" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -63,8 +62,14 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` - // ContainerLogsMaxSize is the maximum size of container logs. Defaults to 10MB. - ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty"` + // KubeletConfiguration configures the kubelet + KubeletConfiguration KubeletConfiguration `json:"kubeletConfiguration"` +} + +// KubeletConfiguration +type KubeletConfiguration struct { + // ContainerLogsMaxSize is the maximum size of container logs. Defaults to 100Mi. + ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } // ContainerRuntimeConfig diff --git a/pkg/apis/kubeone/v1alpha1/types.go b/pkg/apis/kubeone/v1alpha1/types.go index a1fc4582e..6679aad83 100644 --- a/pkg/apis/kubeone/v1alpha1/types.go +++ b/pkg/apis/kubeone/v1alpha1/types.go @@ -57,8 +57,6 @@ type KubeOneCluster struct { SystemPackages *SystemPackages `json:"systemPackages,omitempty"` // Credentials used for machine-controller and external CCM Credentials map[string]string `json:"credentials,omitempty"` - // ContainerLogsMaxSize is the maximum size of container logs. Defaults to 10MB. - ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty"` } // HostConfig describes a single control plane node. diff --git a/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go b/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go index 8038a217f..e67ce0671 100644 --- a/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go @@ -537,7 +537,6 @@ func autoConvert_v1alpha1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneCl } out.SystemPackages = (*kubeone.SystemPackages)(unsafe.Pointer(in.SystemPackages)) // WARNING: in.Credentials requires manual conversion: does not exist in peer-type - out.ContainerLogsMaxSize = in.ContainerLogsMaxSize return nil } @@ -587,7 +586,7 @@ func autoConvert_kubeone_KubeOneCluster_To_v1alpha1_KubeOneCluster(in *kubeone.K out.SystemPackages = (*SystemPackages)(unsafe.Pointer(in.SystemPackages)) // WARNING: in.AssetConfiguration requires manual conversion: does not exist in peer-type // WARNING: in.RegistryConfiguration requires manual conversion: does not exist in peer-type - out.ContainerLogsMaxSize = in.ContainerLogsMaxSize + // WARNING: in.KubeletConfiguration requires manual conversion: does not exist in peer-type return nil } diff --git a/pkg/apis/kubeone/v1beta1/types.go b/pkg/apis/kubeone/v1beta1/types.go index 1892e75a6..fba03bb09 100644 --- a/pkg/apis/kubeone/v1beta1/types.go +++ b/pkg/apis/kubeone/v1beta1/types.go @@ -63,8 +63,14 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` - // ContainerLogsMaxSize is the maximum size of container logs. Defaults to 10MB. - ContainerLogsMaxSize string `json:"containerLogsMaxSize,omitempty"` + // KubeletConfiguration configures the kubelet + KubeletConfiguration KubeletConfiguration `json:"kubeletConfiguration"` +} + +// kubeletConfiguration +type KubeletConfiguration struct { + // ContainerLogsMaxSize is the maximum size of container logs. Defaults to 100Mi. + ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } // ContainerRuntimeConfig diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go index 4aecf1daa..fbfeac1ab 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go @@ -347,6 +347,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*KubeletConfiguration)(nil), (*kubeone.KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(a.(*KubeletConfiguration), b.(*kubeone.KubeletConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.KubeletConfiguration)(nil), (*KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(a.(*kubeone.KubeletConfiguration), b.(*KubeletConfiguration), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*MachineControllerConfig)(nil), (*kubeone.MachineControllerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(a.(*MachineControllerConfig), b.(*kubeone.MachineControllerConfig), scope) }); err != nil { @@ -1336,7 +1346,9 @@ func autoConvert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneClu return err } out.RegistryConfiguration = (*kubeone.RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - out.ContainerLogsMaxSize = in.ContainerLogsMaxSize + if err := Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { + return err + } return nil } @@ -1383,7 +1395,9 @@ func autoConvert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in *kubeone.Ku return err } out.RegistryConfiguration = (*RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - out.ContainerLogsMaxSize = in.ContainerLogsMaxSize + if err := Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { + return err + } return nil } @@ -1416,6 +1430,26 @@ func Convert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *kubeone.Kube return autoConvert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in, out, s) } +func autoConvert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { + out.ContainerLogMaxSize = in.ContainerLogMaxSize + return nil +} + +// Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration is an autogenerated conversion function. +func Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in, out, s) +} + +func autoConvert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error { + out.ContainerLogMaxSize = in.ContainerLogMaxSize + return nil +} + +// Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration is an autogenerated conversion function. +func Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error { + return autoConvert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in, out, s) +} + func autoConvert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(in *MachineControllerConfig, out *kubeone.MachineControllerConfig, s conversion.Scope) error { out.Deploy = in.Deploy return nil diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go index 015ac145f..bdcc0c64c 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go @@ -724,6 +724,7 @@ func (in *KubeOneCluster) DeepCopyInto(out *KubeOneCluster) { *out = new(RegistryConfiguration) **out = **in } + out.KubeletConfiguration = in.KubeletConfiguration return } @@ -771,6 +772,22 @@ func (in *KubeProxyConfig) DeepCopy() *KubeProxyConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfiguration. +func (in *KubeletConfiguration) DeepCopy() *KubeletConfiguration { + if in == nil { + return nil + } + out := new(KubeletConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineControllerConfig) DeepCopyInto(out *MachineControllerConfig) { *out = *in diff --git a/pkg/apis/kubeone/zz_generated.deepcopy.go b/pkg/apis/kubeone/zz_generated.deepcopy.go index 77741bbc0..2b6ab8d71 100644 --- a/pkg/apis/kubeone/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/zz_generated.deepcopy.go @@ -724,6 +724,7 @@ func (in *KubeOneCluster) DeepCopyInto(out *KubeOneCluster) { *out = new(RegistryConfiguration) **out = **in } + out.KubeletConfiguration = in.KubeletConfiguration return } @@ -771,6 +772,22 @@ func (in *KubeProxyConfig) DeepCopy() *KubeProxyConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfiguration. +func (in *KubeletConfiguration) DeepCopy() *KubeletConfiguration { + if in == nil { + return nil + } + out := new(KubeletConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineControllerConfig) DeepCopyInto(out *MachineControllerConfig) { *out = *in diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index c36e84c4b..a9a952c0b 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -55,7 +55,8 @@ type printOpts struct { CloudProviderExternal bool CloudProviderCloudCfg string - ControlPlaneHosts string `longflag:"control-plane-hosts"` + ContainerLogMaxSize string `longflag:"container-log-max-size"` + ControlPlaneHosts string `longflag:"control-plane-hosts"` APIEndpointHost string `longflag:"api-endpoint-host"` APIEndpointPort int `longflag:"api-endpoint-port"` @@ -174,6 +175,9 @@ func configPrintCmd() *cobra.Command { // MachineController cmd.Flags().BoolVar(&opts.DeployMachineController, longFlagName(opts, "DeployMachineController"), true, "deploy kubermatic machine-controller") + // Kubelet Configuration + cmd.Flags().StringVar(&opts.ContainerLogMaxSize, longFlagName(opts, "ContainerLogMaxSize"), "100Mi", "Container Log Max Size") + return cmd } @@ -288,8 +292,6 @@ func createAndPrintManifest(printOptions *printOpts) error { // Version cfg.Set(yamled.Path{"versions", "kubernetes"}, printOptions.KubernetesVersion) - // Container Logs Max Size - cfg.Set(yamled.Path{"containerLogsMaxSize"}, "10Mi") // Provider var providerVal struct{} @@ -364,6 +366,10 @@ func createAndPrintManifest(printOptions *printOpts) error { cfg.Set(yamled.Path{"proxy", "noProxy"}, printOptions.NoProxy) } + // Kubelet Configuration + if printOptions.ContainerLogMaxSize == "" { + cfg.Set(yamled.Path{"kubeletConfiguration", "containerLogMaxSize"}, printOptions.ContainerLogMaxSize) + } // Features printFeatures(cfg, printOptions) @@ -502,11 +508,11 @@ apiVersion: kubeone.io/v1beta1 kind: KubeOneCluster name: {{ .ClusterName }} - versions: - kubernetes: "{{ .KubernetesVersion }}" + kubernetes: "{{ .KubernetesVersion }}" -containerLogsMaxSize: "10Mi" +kubeletConfiguration: + containerLogMaxSize: "{{ .ContainerLogMaxSize }}" clusterNetwork: # the subnet used for pods (default: 10.244.0.0/16) diff --git a/pkg/templates/kubeadm/v1beta2/kubeadm.go b/pkg/templates/kubeadm/v1beta2/kubeadm.go index 5a196cd9b..5650065e9 100644 --- a/pkg/templates/kubeadm/v1beta2/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta2/kubeadm.go @@ -170,7 +170,7 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: cluster.ContainerLogsMaxSize, + ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -362,7 +362,7 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: cluster.ContainerLogsMaxSize, + ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -456,3 +456,11 @@ func kubeProxyConfiguration(s *state.State) *kubeproxyv1alpha1.KubeProxyConfigur return kubeProxyConfig } + +func getContainerLogMaxSize(value string) string { + if value == "" { + return "100Mi" + } + + return value +} diff --git a/pkg/templates/kubeadm/v1beta3/kubeadm.go b/pkg/templates/kubeadm/v1beta3/kubeadm.go index 49f438435..b89699e65 100644 --- a/pkg/templates/kubeadm/v1beta3/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta3/kubeadm.go @@ -170,7 +170,7 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: cluster.ContainerLogsMaxSize, + ContainerLogMaxSize: getContainerLogsMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -362,7 +362,7 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: cluster.ContainerLogsMaxSize, + ContainerLogMaxSize: getContainerLogsMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -370,6 +370,9 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje }, FeatureGates: map[string]bool{}, } + if cluster.KubeletConfiguration.ContainerLogMaxSize == "" { + cluster.KubeletConfiguration.ContainerLogMaxSize = "100Mi" + } if cluster.AssetConfiguration.Pause.ImageRepository != "" { nodeRegistration.KubeletExtraArgs["pod-infra-container-image"] = cluster.AssetConfiguration.Pause.ImageRepository + "/pause:" + cluster.AssetConfiguration.Pause.ImageTag @@ -456,3 +459,11 @@ func kubeProxyConfiguration(s *state.State) *kubeproxyv1alpha1.KubeProxyConfigur return kubeProxyConfig } + +func getContainerLogsMaxSize(value string) string { + if value == "" { + return "100Mi" + } + + return value +} From d3ee2b39ad552c92ebebe6a61bf8fde76cc361c2 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Thu, 25 Nov 2021 14:30:18 +0200 Subject: [PATCH 06/40] chore: update code gen --- pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go b/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go index e67ce0671..d81c6150c 100644 --- a/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go @@ -497,7 +497,7 @@ func autoConvert_kubeone_HostConfig_To_v1alpha1_HostConfig(in *kubeone.HostConfi func autoConvert_v1alpha1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneCluster, out *kubeone.KubeOneCluster, s conversion.Scope) error { out.Name = in.Name // WARNING: in.Hosts requires manual conversion: does not exist in peer-type - // WARNING: in.StaticWorkers requires manual conversion: inconvertible types ([]github.com/nerdeveloper/kubeone/pkg/apis/kubeone/v1alpha1.HostConfig vs k8c.io/kubeone/pkg/apis/kubeone.StaticWorkersConfig) + // WARNING: in.StaticWorkers requires manual conversion: inconvertible types ([]k8c.io/kubeone/pkg/apis/kubeone/v1alpha1.HostConfig vs k8c.io/kubeone/pkg/apis/kubeone.StaticWorkersConfig) if err := Convert_v1alpha1_APIEndpoint_To_kubeone_APIEndpoint(&in.APIEndpoint, &out.APIEndpoint, s); err != nil { return err } @@ -559,7 +559,7 @@ func autoConvert_kubeone_KubeOneCluster_To_v1alpha1_KubeOneCluster(in *kubeone.K if err := Convert_kubeone_ProxyConfig_To_v1alpha1_ProxyConfig(&in.Proxy, &out.Proxy, s); err != nil { return err } - // WARNING: in.StaticWorkers requires manual conversion: inconvertible types (k8c.io/kubeone/pkg/apis/kubeone.StaticWorkersConfig vs []github.com/nerdeveloper/kubeone/pkg/apis/kubeone/v1alpha1.HostConfig) + // WARNING: in.StaticWorkers requires manual conversion: inconvertible types (k8c.io/kubeone/pkg/apis/kubeone.StaticWorkersConfig vs []k8c.io/kubeone/pkg/apis/kubeone/v1alpha1.HostConfig) // WARNING: in.DynamicWorkers requires manual conversion: does not exist in peer-type if in.MachineController != nil { in, out := &in.MachineController, &out.MachineController From 347693c6d791f070b9a421724e5a31803a5f6fed Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Thu, 25 Nov 2021 14:46:53 +0200 Subject: [PATCH 07/40] chore: update code gen --- pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go | 1 + pkg/apis/kubeone/v1alpha1/zz_generated.deepcopy.go | 1 + pkg/apis/kubeone/v1alpha1/zz_generated.defaults.go | 1 + pkg/apis/kubeone/v1beta1/zz_generated.conversion.go | 1 + pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go | 1 + pkg/apis/kubeone/v1beta1/zz_generated.defaults.go | 1 + pkg/apis/kubeone/zz_generated.deepcopy.go | 1 + 7 files changed, 7 insertions(+) diff --git a/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go b/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go index d81c6150c..01a7a04e3 100644 --- a/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1alpha1/zz_generated.conversion.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/apis/kubeone/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/kubeone/v1alpha1/zz_generated.deepcopy.go index 40302ecf2..26ba9c518 100644 --- a/pkg/apis/kubeone/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/apis/kubeone/v1alpha1/zz_generated.defaults.go b/pkg/apis/kubeone/v1alpha1/zz_generated.defaults.go index a24f32a7d..c475bfed8 100644 --- a/pkg/apis/kubeone/v1alpha1/zz_generated.defaults.go +++ b/pkg/apis/kubeone/v1alpha1/zz_generated.defaults.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go index fbfeac1ab..8f3d2ecdf 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go index bdcc0c64c..aae7a79f8 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.defaults.go b/pkg/apis/kubeone/v1beta1/zz_generated.defaults.go index f3c17be2c..dfebd51d7 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.defaults.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.defaults.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/apis/kubeone/zz_generated.deepcopy.go b/pkg/apis/kubeone/zz_generated.deepcopy.go index 2b6ab8d71..05876326f 100644 --- a/pkg/apis/kubeone/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* From 649812a3c6881f7da850c4dc1b18f27b6766c9f8 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Thu, 25 Nov 2021 15:07:51 +0200 Subject: [PATCH 08/40] chore: sort goimports --- pkg/apis/kubeone/types.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index d97205f9f..f45916e6f 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -18,6 +18,7 @@ package kubeone import ( "encoding/json" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) From 138b730971a4e175682301d85594be4d1db83af8 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 5 Jan 2022 13:57:46 +0400 Subject: [PATCH 09/40] chore: update code --- pkg/apis/kubeone/v1beta1/types.go | 8 ---- .../v1beta1/zz_generated.conversion.go | 42 +------------------ .../kubeone/v1beta1/zz_generated.deepcopy.go | 17 -------- pkg/cmd/config.go | 3 -- 4 files changed, 1 insertion(+), 69 deletions(-) diff --git a/pkg/apis/kubeone/v1beta1/types.go b/pkg/apis/kubeone/v1beta1/types.go index fba03bb09..089f83111 100644 --- a/pkg/apis/kubeone/v1beta1/types.go +++ b/pkg/apis/kubeone/v1beta1/types.go @@ -63,14 +63,6 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` - // KubeletConfiguration configures the kubelet - KubeletConfiguration KubeletConfiguration `json:"kubeletConfiguration"` -} - -// kubeletConfiguration -type KubeletConfiguration struct { - // ContainerLogsMaxSize is the maximum size of container logs. Defaults to 100Mi. - ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } // ContainerRuntimeConfig diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go index 8f3d2ecdf..de98962a1 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go @@ -348,16 +348,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeletConfiguration)(nil), (*kubeone.KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(a.(*KubeletConfiguration), b.(*kubeone.KubeletConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.KubeletConfiguration)(nil), (*KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(a.(*kubeone.KubeletConfiguration), b.(*KubeletConfiguration), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*MachineControllerConfig)(nil), (*kubeone.MachineControllerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(a.(*MachineControllerConfig), b.(*kubeone.MachineControllerConfig), scope) }); err != nil { @@ -1347,9 +1337,6 @@ func autoConvert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneClu return err } out.RegistryConfiguration = (*kubeone.RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - if err := Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { - return err - } return nil } @@ -1396,17 +1383,10 @@ func autoConvert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in *kubeone.Ku return err } out.RegistryConfiguration = (*RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - if err := Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { - return err - } + // WARNING: in.KubeletConfiguration requires manual conversion: does not exist in peer-type return nil } -// Convert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster is an autogenerated conversion function. -func Convert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in *kubeone.KubeOneCluster, out *KubeOneCluster, s conversion.Scope) error { - return autoConvert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in, out, s) -} - func autoConvert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig(in *KubeProxyConfig, out *kubeone.KubeProxyConfig, s conversion.Scope) error { out.SkipInstallation = in.SkipInstallation out.IPVS = (*kubeone.IPVSConfig)(unsafe.Pointer(in.IPVS)) @@ -1431,26 +1411,6 @@ func Convert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *kubeone.Kube return autoConvert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in, out, s) } -func autoConvert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { - out.ContainerLogMaxSize = in.ContainerLogMaxSize - return nil -} - -// Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration is an autogenerated conversion function. -func Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { - return autoConvert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in, out, s) -} - -func autoConvert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error { - out.ContainerLogMaxSize = in.ContainerLogMaxSize - return nil -} - -// Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration is an autogenerated conversion function. -func Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error { - return autoConvert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in, out, s) -} - func autoConvert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(in *MachineControllerConfig, out *kubeone.MachineControllerConfig, s conversion.Scope) error { out.Deploy = in.Deploy return nil diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go index aae7a79f8..c366ad081 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go @@ -725,7 +725,6 @@ func (in *KubeOneCluster) DeepCopyInto(out *KubeOneCluster) { *out = new(RegistryConfiguration) **out = **in } - out.KubeletConfiguration = in.KubeletConfiguration return } @@ -773,22 +772,6 @@ func (in *KubeProxyConfig) DeepCopy() *KubeProxyConfig { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfiguration. -func (in *KubeletConfiguration) DeepCopy() *KubeletConfiguration { - if in == nil { - return nil - } - out := new(KubeletConfiguration) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineControllerConfig) DeepCopyInto(out *MachineControllerConfig) { *out = *in diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index a9a952c0b..7f649bb13 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -511,9 +511,6 @@ name: {{ .ClusterName }} versions: kubernetes: "{{ .KubernetesVersion }}" -kubeletConfiguration: - containerLogMaxSize: "{{ .ContainerLogMaxSize }}" - clusterNetwork: # the subnet used for pods (default: 10.244.0.0/16) podSubnet: "{{ .PodSubnet }}" From 99b9a4868306958ecdbf6e07bce04f9f481dc6ca Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 5 Jan 2022 15:40:18 +0400 Subject: [PATCH 10/40] refactor: remove container log max size from old API and add to new one --- pkg/apis/kubeone/types.go | 11 +- .../v1beta1/zz_generated.conversion.go | 1904 ----------------- pkg/apis/kubeone/v1beta2/types.go | 3 + .../v1beta2/zz_generated.conversion.go | 2 + pkg/templates/kubeadm/v1beta2/kubeadm.go | 32 +- pkg/templates/kubeadm/v1beta3/kubeadm.go | 35 +- 6 files changed, 36 insertions(+), 1951 deletions(-) delete mode 100644 pkg/apis/kubeone/v1beta1/zz_generated.conversion.go diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index 21cdab310..ee700ec4a 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -63,14 +63,6 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` - // KubeletConfiguration configures the kubelet - KubeletConfiguration KubeletConfiguration `json:"kubeletConfiguration"` -} - -// KubeletConfiguration -type KubeletConfiguration struct { - // ContainerLogsMaxSize is the maximum size of container logs. Defaults to 100Mi. - ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } // ContainerRuntimeConfig @@ -190,6 +182,9 @@ type KubeletConfig struct { // EvictionHard configure --eviction-hard command-line flag of the kubelet. // See more at: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ EvictionHard map[string]string `json:"evictionHard,omitempty"` + //ContainerLogsMaxSize configure --container-logs-max-size command-line flag of the kubelet. Defaults to 100Mi. + // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ + ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } // APIEndpoint is the endpoint used to communicate with the Kubernetes API diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go deleted file mode 100644 index b6e158238..000000000 --- a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go +++ /dev/null @@ -1,1904 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The KubeOne 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 v1beta1 - -import ( - json "encoding/json" - unsafe "unsafe" - - kubeone "k8c.io/kubeone/pkg/apis/kubeone" - v1 "k8s.io/api/core/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -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((*APIEndpoint)(nil), (*kubeone.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint(a.(*APIEndpoint), b.(*kubeone.APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint(a.(*kubeone.APIEndpoint), b.(*APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AWSSpec)(nil), (*kubeone.AWSSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AWSSpec_To_kubeone_AWSSpec(a.(*AWSSpec), b.(*kubeone.AWSSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.AWSSpec)(nil), (*AWSSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_AWSSpec_To_v1beta1_AWSSpec(a.(*kubeone.AWSSpec), b.(*AWSSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Addon)(nil), (*kubeone.Addon)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Addon_To_kubeone_Addon(a.(*Addon), b.(*kubeone.Addon), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.Addon)(nil), (*Addon)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_Addon_To_v1beta1_Addon(a.(*kubeone.Addon), b.(*Addon), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Addons)(nil), (*kubeone.Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Addons_To_kubeone_Addons(a.(*Addons), b.(*kubeone.Addons), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.Addons)(nil), (*Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_Addons_To_v1beta1_Addons(a.(*kubeone.Addons), b.(*Addons), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AssetConfiguration)(nil), (*kubeone.AssetConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration(a.(*AssetConfiguration), b.(*kubeone.AssetConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.AssetConfiguration)(nil), (*AssetConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration(a.(*kubeone.AssetConfiguration), b.(*AssetConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureSpec)(nil), (*kubeone.AzureSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureSpec_To_kubeone_AzureSpec(a.(*AzureSpec), b.(*kubeone.AzureSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.AzureSpec)(nil), (*AzureSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_AzureSpec_To_v1beta1_AzureSpec(a.(*kubeone.AzureSpec), b.(*AzureSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BinaryAsset)(nil), (*kubeone.BinaryAsset)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(a.(*BinaryAsset), b.(*kubeone.BinaryAsset), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.BinaryAsset)(nil), (*BinaryAsset)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(a.(*kubeone.BinaryAsset), b.(*BinaryAsset), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CNI)(nil), (*kubeone.CNI)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CNI_To_kubeone_CNI(a.(*CNI), b.(*kubeone.CNI), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.CNI)(nil), (*CNI)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_CNI_To_v1beta1_CNI(a.(*kubeone.CNI), b.(*CNI), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CanalSpec)(nil), (*kubeone.CanalSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CanalSpec_To_kubeone_CanalSpec(a.(*CanalSpec), b.(*kubeone.CanalSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.CanalSpec)(nil), (*CanalSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_CanalSpec_To_v1beta1_CanalSpec(a.(*kubeone.CanalSpec), b.(*CanalSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CiliumSpec)(nil), (*kubeone.CiliumSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CiliumSpec_To_kubeone_CiliumSpec(a.(*CiliumSpec), b.(*kubeone.CiliumSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.CiliumSpec)(nil), (*CiliumSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_CiliumSpec_To_v1beta1_CiliumSpec(a.(*kubeone.CiliumSpec), b.(*CiliumSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClusterNetworkConfig)(nil), (*kubeone.ClusterNetworkConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig(a.(*ClusterNetworkConfig), b.(*kubeone.ClusterNetworkConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.ClusterNetworkConfig)(nil), (*ClusterNetworkConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig(a.(*kubeone.ClusterNetworkConfig), b.(*ClusterNetworkConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ContainerRuntimeConfig)(nil), (*kubeone.ContainerRuntimeConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig(a.(*ContainerRuntimeConfig), b.(*kubeone.ContainerRuntimeConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.ContainerRuntimeConfig)(nil), (*ContainerRuntimeConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig(a.(*kubeone.ContainerRuntimeConfig), b.(*ContainerRuntimeConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ContainerRuntimeContainerd)(nil), (*kubeone.ContainerRuntimeContainerd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd(a.(*ContainerRuntimeContainerd), b.(*kubeone.ContainerRuntimeContainerd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ContainerRuntimeDocker)(nil), (*kubeone.ContainerRuntimeDocker)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker(a.(*ContainerRuntimeDocker), b.(*kubeone.ContainerRuntimeDocker), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ControlPlaneConfig)(nil), (*kubeone.ControlPlaneConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig(a.(*ControlPlaneConfig), b.(*kubeone.ControlPlaneConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.ControlPlaneConfig)(nil), (*ControlPlaneConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig(a.(*kubeone.ControlPlaneConfig), b.(*ControlPlaneConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DNSConfig)(nil), (*kubeone.DNSConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DNSConfig_To_kubeone_DNSConfig(a.(*DNSConfig), b.(*kubeone.DNSConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.DNSConfig)(nil), (*DNSConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_DNSConfig_To_v1beta1_DNSConfig(a.(*kubeone.DNSConfig), b.(*DNSConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DigitalOceanSpec)(nil), (*kubeone.DigitalOceanSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DigitalOceanSpec_To_kubeone_DigitalOceanSpec(a.(*DigitalOceanSpec), b.(*kubeone.DigitalOceanSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.DigitalOceanSpec)(nil), (*DigitalOceanSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_DigitalOceanSpec_To_v1beta1_DigitalOceanSpec(a.(*kubeone.DigitalOceanSpec), b.(*DigitalOceanSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DynamicAuditLog)(nil), (*kubeone.DynamicAuditLog)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DynamicAuditLog_To_kubeone_DynamicAuditLog(a.(*DynamicAuditLog), b.(*kubeone.DynamicAuditLog), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.DynamicAuditLog)(nil), (*DynamicAuditLog)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_DynamicAuditLog_To_v1beta1_DynamicAuditLog(a.(*kubeone.DynamicAuditLog), b.(*DynamicAuditLog), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DynamicWorkerConfig)(nil), (*kubeone.DynamicWorkerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DynamicWorkerConfig_To_kubeone_DynamicWorkerConfig(a.(*DynamicWorkerConfig), b.(*kubeone.DynamicWorkerConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.DynamicWorkerConfig)(nil), (*DynamicWorkerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_DynamicWorkerConfig_To_v1beta1_DynamicWorkerConfig(a.(*kubeone.DynamicWorkerConfig), b.(*DynamicWorkerConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*EncryptionProviders)(nil), (*kubeone.EncryptionProviders)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_EncryptionProviders_To_kubeone_EncryptionProviders(a.(*EncryptionProviders), b.(*kubeone.EncryptionProviders), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.EncryptionProviders)(nil), (*EncryptionProviders)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_EncryptionProviders_To_v1beta1_EncryptionProviders(a.(*kubeone.EncryptionProviders), b.(*EncryptionProviders), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ExternalCNISpec)(nil), (*kubeone.ExternalCNISpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ExternalCNISpec_To_kubeone_ExternalCNISpec(a.(*ExternalCNISpec), b.(*kubeone.ExternalCNISpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.ExternalCNISpec)(nil), (*ExternalCNISpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_ExternalCNISpec_To_v1beta1_ExternalCNISpec(a.(*kubeone.ExternalCNISpec), b.(*ExternalCNISpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.Features)(nil), (*Features)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_Features_To_v1beta1_Features(a.(*kubeone.Features), b.(*Features), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*GCESpec)(nil), (*kubeone.GCESpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_GCESpec_To_kubeone_GCESpec(a.(*GCESpec), b.(*kubeone.GCESpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.GCESpec)(nil), (*GCESpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_GCESpec_To_v1beta1_GCESpec(a.(*kubeone.GCESpec), b.(*GCESpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*HetznerSpec)(nil), (*kubeone.HetznerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_HetznerSpec_To_kubeone_HetznerSpec(a.(*HetznerSpec), b.(*kubeone.HetznerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.HetznerSpec)(nil), (*HetznerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_HetznerSpec_To_v1beta1_HetznerSpec(a.(*kubeone.HetznerSpec), b.(*HetznerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*HostConfig)(nil), (*kubeone.HostConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_HostConfig_To_kubeone_HostConfig(a.(*HostConfig), b.(*kubeone.HostConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IPTables)(nil), (*kubeone.IPTables)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_IPTables_To_kubeone_IPTables(a.(*IPTables), b.(*kubeone.IPTables), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.IPTables)(nil), (*IPTables)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_IPTables_To_v1beta1_IPTables(a.(*kubeone.IPTables), b.(*IPTables), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IPVSConfig)(nil), (*kubeone.IPVSConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_IPVSConfig_To_kubeone_IPVSConfig(a.(*IPVSConfig), b.(*kubeone.IPVSConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.IPVSConfig)(nil), (*IPVSConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_IPVSConfig_To_v1beta1_IPVSConfig(a.(*kubeone.IPVSConfig), b.(*IPVSConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ImageAsset)(nil), (*kubeone.ImageAsset)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(a.(*ImageAsset), b.(*kubeone.ImageAsset), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.ImageAsset)(nil), (*ImageAsset)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(a.(*kubeone.ImageAsset), b.(*ImageAsset), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*KubeOneCluster)(nil), (*kubeone.KubeOneCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(a.(*KubeOneCluster), b.(*kubeone.KubeOneCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.KubeOneCluster)(nil), (*KubeOneCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(a.(*kubeone.KubeOneCluster), b.(*KubeOneCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*KubeProxyConfig)(nil), (*kubeone.KubeProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig(a.(*KubeProxyConfig), b.(*kubeone.KubeProxyConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.KubeProxyConfig)(nil), (*KubeProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(a.(*kubeone.KubeProxyConfig), b.(*KubeProxyConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*MachineControllerConfig)(nil), (*kubeone.MachineControllerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(a.(*MachineControllerConfig), b.(*kubeone.MachineControllerConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.MachineControllerConfig)(nil), (*MachineControllerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_MachineControllerConfig_To_v1beta1_MachineControllerConfig(a.(*kubeone.MachineControllerConfig), b.(*MachineControllerConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*MetricsServer)(nil), (*kubeone.MetricsServer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MetricsServer_To_kubeone_MetricsServer(a.(*MetricsServer), b.(*kubeone.MetricsServer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.MetricsServer)(nil), (*MetricsServer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_MetricsServer_To_v1beta1_MetricsServer(a.(*kubeone.MetricsServer), b.(*MetricsServer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NoneSpec)(nil), (*kubeone.NoneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NoneSpec_To_kubeone_NoneSpec(a.(*NoneSpec), b.(*kubeone.NoneSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.NoneSpec)(nil), (*NoneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_NoneSpec_To_v1beta1_NoneSpec(a.(*kubeone.NoneSpec), b.(*NoneSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OpenIDConnect)(nil), (*kubeone.OpenIDConnect)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_OpenIDConnect_To_kubeone_OpenIDConnect(a.(*OpenIDConnect), b.(*kubeone.OpenIDConnect), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.OpenIDConnect)(nil), (*OpenIDConnect)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_OpenIDConnect_To_v1beta1_OpenIDConnect(a.(*kubeone.OpenIDConnect), b.(*OpenIDConnect), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OpenIDConnectConfig)(nil), (*kubeone.OpenIDConnectConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(a.(*OpenIDConnectConfig), b.(*kubeone.OpenIDConnectConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.OpenIDConnectConfig)(nil), (*OpenIDConnectConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig(a.(*kubeone.OpenIDConnectConfig), b.(*OpenIDConnectConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OpenstackSpec)(nil), (*kubeone.OpenstackSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_OpenstackSpec_To_kubeone_OpenstackSpec(a.(*OpenstackSpec), b.(*kubeone.OpenstackSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.OpenstackSpec)(nil), (*OpenstackSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_OpenstackSpec_To_v1beta1_OpenstackSpec(a.(*kubeone.OpenstackSpec), b.(*OpenstackSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*PodNodeSelector)(nil), (*kubeone.PodNodeSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_PodNodeSelector_To_kubeone_PodNodeSelector(a.(*PodNodeSelector), b.(*kubeone.PodNodeSelector), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.PodNodeSelector)(nil), (*PodNodeSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_PodNodeSelector_To_v1beta1_PodNodeSelector(a.(*kubeone.PodNodeSelector), b.(*PodNodeSelector), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*PodNodeSelectorConfig)(nil), (*kubeone.PodNodeSelectorConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig(a.(*PodNodeSelectorConfig), b.(*kubeone.PodNodeSelectorConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.PodNodeSelectorConfig)(nil), (*PodNodeSelectorConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig(a.(*kubeone.PodNodeSelectorConfig), b.(*PodNodeSelectorConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*PodSecurityPolicy)(nil), (*kubeone.PodSecurityPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_PodSecurityPolicy_To_kubeone_PodSecurityPolicy(a.(*PodSecurityPolicy), b.(*kubeone.PodSecurityPolicy), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.PodSecurityPolicy)(nil), (*PodSecurityPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(a.(*kubeone.PodSecurityPolicy), b.(*PodSecurityPolicy), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ProviderSpec)(nil), (*kubeone.ProviderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec(a.(*ProviderSpec), b.(*kubeone.ProviderSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.ProviderSpec)(nil), (*ProviderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec(a.(*kubeone.ProviderSpec), b.(*ProviderSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ProviderStaticNetworkConfig)(nil), (*kubeone.ProviderStaticNetworkConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ProviderStaticNetworkConfig_To_kubeone_ProviderStaticNetworkConfig(a.(*ProviderStaticNetworkConfig), b.(*kubeone.ProviderStaticNetworkConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.ProviderStaticNetworkConfig)(nil), (*ProviderStaticNetworkConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_ProviderStaticNetworkConfig_To_v1beta1_ProviderStaticNetworkConfig(a.(*kubeone.ProviderStaticNetworkConfig), b.(*ProviderStaticNetworkConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ProxyConfig)(nil), (*kubeone.ProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig(a.(*ProxyConfig), b.(*kubeone.ProxyConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.ProxyConfig)(nil), (*ProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig(a.(*kubeone.ProxyConfig), b.(*ProxyConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*RegistryConfiguration)(nil), (*kubeone.RegistryConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_RegistryConfiguration_To_kubeone_RegistryConfiguration(a.(*RegistryConfiguration), b.(*kubeone.RegistryConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.RegistryConfiguration)(nil), (*RegistryConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_RegistryConfiguration_To_v1beta1_RegistryConfiguration(a.(*kubeone.RegistryConfiguration), b.(*RegistryConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*StaticAuditLog)(nil), (*kubeone.StaticAuditLog)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_StaticAuditLog_To_kubeone_StaticAuditLog(a.(*StaticAuditLog), b.(*kubeone.StaticAuditLog), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.StaticAuditLog)(nil), (*StaticAuditLog)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_StaticAuditLog_To_v1beta1_StaticAuditLog(a.(*kubeone.StaticAuditLog), b.(*StaticAuditLog), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*StaticAuditLogConfig)(nil), (*kubeone.StaticAuditLogConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig(a.(*StaticAuditLogConfig), b.(*kubeone.StaticAuditLogConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.StaticAuditLogConfig)(nil), (*StaticAuditLogConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig(a.(*kubeone.StaticAuditLogConfig), b.(*StaticAuditLogConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*StaticWorkersConfig)(nil), (*kubeone.StaticWorkersConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig(a.(*StaticWorkersConfig), b.(*kubeone.StaticWorkersConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.StaticWorkersConfig)(nil), (*StaticWorkersConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig(a.(*kubeone.StaticWorkersConfig), b.(*StaticWorkersConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SystemPackages)(nil), (*kubeone.SystemPackages)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SystemPackages_To_kubeone_SystemPackages(a.(*SystemPackages), b.(*kubeone.SystemPackages), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.SystemPackages)(nil), (*SystemPackages)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_SystemPackages_To_v1beta1_SystemPackages(a.(*kubeone.SystemPackages), b.(*SystemPackages), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VersionConfig)(nil), (*kubeone.VersionConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VersionConfig_To_kubeone_VersionConfig(a.(*VersionConfig), b.(*kubeone.VersionConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.VersionConfig)(nil), (*VersionConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_VersionConfig_To_v1beta1_VersionConfig(a.(*kubeone.VersionConfig), b.(*VersionConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VsphereSpec)(nil), (*kubeone.VsphereSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VsphereSpec_To_kubeone_VsphereSpec(a.(*VsphereSpec), b.(*kubeone.VsphereSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.VsphereSpec)(nil), (*VsphereSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_VsphereSpec_To_v1beta1_VsphereSpec(a.(*kubeone.VsphereSpec), b.(*VsphereSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*WeaveNetSpec)(nil), (*kubeone.WeaveNetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_WeaveNetSpec_To_kubeone_WeaveNetSpec(a.(*WeaveNetSpec), b.(*kubeone.WeaveNetSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.WeaveNetSpec)(nil), (*WeaveNetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_WeaveNetSpec_To_v1beta1_WeaveNetSpec(a.(*kubeone.WeaveNetSpec), b.(*WeaveNetSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*kubeone.CloudProviderSpec)(nil), (*CloudProviderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_CloudProviderSpec_To_v1beta1_CloudProviderSpec(a.(*kubeone.CloudProviderSpec), b.(*CloudProviderSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*kubeone.ContainerRuntimeContainerd)(nil), (*ContainerRuntimeContainerd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_ContainerRuntimeContainerd_To_v1beta1_ContainerRuntimeContainerd(a.(*kubeone.ContainerRuntimeContainerd), b.(*ContainerRuntimeContainerd), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*kubeone.ContainerRuntimeDocker)(nil), (*ContainerRuntimeDocker)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_ContainerRuntimeDocker_To_v1beta1_ContainerRuntimeDocker(a.(*kubeone.ContainerRuntimeDocker), b.(*ContainerRuntimeDocker), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*kubeone.HostConfig)(nil), (*HostConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_HostConfig_To_v1beta1_HostConfig(a.(*kubeone.HostConfig), b.(*HostConfig), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*CloudProviderSpec)(nil), (*kubeone.CloudProviderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CloudProviderSpec_To_kubeone_CloudProviderSpec(a.(*CloudProviderSpec), b.(*kubeone.CloudProviderSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*Features)(nil), (*kubeone.Features)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Features_To_kubeone_Features(a.(*Features), b.(*kubeone.Features), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint(in *APIEndpoint, out *kubeone.APIEndpoint, s conversion.Scope) error { - out.Host = in.Host - out.Port = in.Port - out.AlternativeNames = *(*[]string)(unsafe.Pointer(&in.AlternativeNames)) - return nil -} - -// Convert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint is an autogenerated conversion function. -func Convert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint(in *APIEndpoint, out *kubeone.APIEndpoint, s conversion.Scope) error { - return autoConvert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint(in, out, s) -} - -func autoConvert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint(in *kubeone.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - out.Host = in.Host - out.Port = in.Port - out.AlternativeNames = *(*[]string)(unsafe.Pointer(&in.AlternativeNames)) - return nil -} - -// Convert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. -func Convert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint(in *kubeone.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - return autoConvert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) -} - -func autoConvert_v1beta1_AWSSpec_To_kubeone_AWSSpec(in *AWSSpec, out *kubeone.AWSSpec, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_AWSSpec_To_kubeone_AWSSpec is an autogenerated conversion function. -func Convert_v1beta1_AWSSpec_To_kubeone_AWSSpec(in *AWSSpec, out *kubeone.AWSSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AWSSpec_To_kubeone_AWSSpec(in, out, s) -} - -func autoConvert_kubeone_AWSSpec_To_v1beta1_AWSSpec(in *kubeone.AWSSpec, out *AWSSpec, s conversion.Scope) error { - return nil -} - -// Convert_kubeone_AWSSpec_To_v1beta1_AWSSpec is an autogenerated conversion function. -func Convert_kubeone_AWSSpec_To_v1beta1_AWSSpec(in *kubeone.AWSSpec, out *AWSSpec, s conversion.Scope) error { - return autoConvert_kubeone_AWSSpec_To_v1beta1_AWSSpec(in, out, s) -} - -func autoConvert_v1beta1_Addon_To_kubeone_Addon(in *Addon, out *kubeone.Addon, s conversion.Scope) error { - out.Name = in.Name - out.Params = *(*map[string]string)(unsafe.Pointer(&in.Params)) - out.Delete = in.Delete - return nil -} - -// Convert_v1beta1_Addon_To_kubeone_Addon is an autogenerated conversion function. -func Convert_v1beta1_Addon_To_kubeone_Addon(in *Addon, out *kubeone.Addon, s conversion.Scope) error { - return autoConvert_v1beta1_Addon_To_kubeone_Addon(in, out, s) -} - -func autoConvert_kubeone_Addon_To_v1beta1_Addon(in *kubeone.Addon, out *Addon, s conversion.Scope) error { - out.Name = in.Name - out.Params = *(*map[string]string)(unsafe.Pointer(&in.Params)) - out.Delete = in.Delete - return nil -} - -// Convert_kubeone_Addon_To_v1beta1_Addon is an autogenerated conversion function. -func Convert_kubeone_Addon_To_v1beta1_Addon(in *kubeone.Addon, out *Addon, s conversion.Scope) error { - return autoConvert_kubeone_Addon_To_v1beta1_Addon(in, out, s) -} - -func autoConvert_v1beta1_Addons_To_kubeone_Addons(in *Addons, out *kubeone.Addons, s conversion.Scope) error { - out.Enable = in.Enable - out.Path = in.Path - out.GlobalParams = *(*map[string]string)(unsafe.Pointer(&in.GlobalParams)) - out.Addons = *(*[]kubeone.Addon)(unsafe.Pointer(&in.Addons)) - return nil -} - -// Convert_v1beta1_Addons_To_kubeone_Addons is an autogenerated conversion function. -func Convert_v1beta1_Addons_To_kubeone_Addons(in *Addons, out *kubeone.Addons, s conversion.Scope) error { - return autoConvert_v1beta1_Addons_To_kubeone_Addons(in, out, s) -} - -func autoConvert_kubeone_Addons_To_v1beta1_Addons(in *kubeone.Addons, out *Addons, s conversion.Scope) error { - out.Enable = in.Enable - out.Path = in.Path - out.GlobalParams = *(*map[string]string)(unsafe.Pointer(&in.GlobalParams)) - out.Addons = *(*[]Addon)(unsafe.Pointer(&in.Addons)) - return nil -} - -// Convert_kubeone_Addons_To_v1beta1_Addons is an autogenerated conversion function. -func Convert_kubeone_Addons_To_v1beta1_Addons(in *kubeone.Addons, out *Addons, s conversion.Scope) error { - return autoConvert_kubeone_Addons_To_v1beta1_Addons(in, out, s) -} - -func autoConvert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration(in *AssetConfiguration, out *kubeone.AssetConfiguration, s conversion.Scope) error { - if err := Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(&in.Kubernetes, &out.Kubernetes, s); err != nil { - return err - } - if err := Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(&in.Pause, &out.Pause, s); err != nil { - return err - } - if err := Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(&in.CoreDNS, &out.CoreDNS, s); err != nil { - return err - } - if err := Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(&in.Etcd, &out.Etcd, s); err != nil { - return err - } - if err := Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(&in.MetricsServer, &out.MetricsServer, s); err != nil { - return err - } - if err := Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(&in.CNI, &out.CNI, s); err != nil { - return err - } - if err := Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(&in.NodeBinaries, &out.NodeBinaries, s); err != nil { - return err - } - if err := Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(&in.Kubectl, &out.Kubectl, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration is an autogenerated conversion function. -func Convert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration(in *AssetConfiguration, out *kubeone.AssetConfiguration, s conversion.Scope) error { - return autoConvert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration(in, out, s) -} - -func autoConvert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration(in *kubeone.AssetConfiguration, out *AssetConfiguration, s conversion.Scope) error { - if err := Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(&in.Kubernetes, &out.Kubernetes, s); err != nil { - return err - } - if err := Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(&in.Pause, &out.Pause, s); err != nil { - return err - } - if err := Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(&in.CoreDNS, &out.CoreDNS, s); err != nil { - return err - } - if err := Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(&in.Etcd, &out.Etcd, s); err != nil { - return err - } - if err := Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(&in.MetricsServer, &out.MetricsServer, s); err != nil { - return err - } - if err := Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(&in.CNI, &out.CNI, s); err != nil { - return err - } - if err := Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(&in.NodeBinaries, &out.NodeBinaries, s); err != nil { - return err - } - if err := Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(&in.Kubectl, &out.Kubectl, s); err != nil { - return err - } - return nil -} - -// Convert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration is an autogenerated conversion function. -func Convert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration(in *kubeone.AssetConfiguration, out *AssetConfiguration, s conversion.Scope) error { - return autoConvert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration(in, out, s) -} - -func autoConvert_v1beta1_AzureSpec_To_kubeone_AzureSpec(in *AzureSpec, out *kubeone.AzureSpec, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_AzureSpec_To_kubeone_AzureSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureSpec_To_kubeone_AzureSpec(in *AzureSpec, out *kubeone.AzureSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureSpec_To_kubeone_AzureSpec(in, out, s) -} - -func autoConvert_kubeone_AzureSpec_To_v1beta1_AzureSpec(in *kubeone.AzureSpec, out *AzureSpec, s conversion.Scope) error { - return nil -} - -// Convert_kubeone_AzureSpec_To_v1beta1_AzureSpec is an autogenerated conversion function. -func Convert_kubeone_AzureSpec_To_v1beta1_AzureSpec(in *kubeone.AzureSpec, out *AzureSpec, s conversion.Scope) error { - return autoConvert_kubeone_AzureSpec_To_v1beta1_AzureSpec(in, out, s) -} - -func autoConvert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(in *BinaryAsset, out *kubeone.BinaryAsset, s conversion.Scope) error { - out.URL = in.URL - return nil -} - -// Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset is an autogenerated conversion function. -func Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(in *BinaryAsset, out *kubeone.BinaryAsset, s conversion.Scope) error { - return autoConvert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(in, out, s) -} - -func autoConvert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(in *kubeone.BinaryAsset, out *BinaryAsset, s conversion.Scope) error { - out.URL = in.URL - return nil -} - -// Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset is an autogenerated conversion function. -func Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(in *kubeone.BinaryAsset, out *BinaryAsset, s conversion.Scope) error { - return autoConvert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(in, out, s) -} - -func autoConvert_v1beta1_CNI_To_kubeone_CNI(in *CNI, out *kubeone.CNI, s conversion.Scope) error { - out.Canal = (*kubeone.CanalSpec)(unsafe.Pointer(in.Canal)) - out.Cilium = (*kubeone.CiliumSpec)(unsafe.Pointer(in.Cilium)) - out.WeaveNet = (*kubeone.WeaveNetSpec)(unsafe.Pointer(in.WeaveNet)) - out.External = (*kubeone.ExternalCNISpec)(unsafe.Pointer(in.External)) - return nil -} - -// Convert_v1beta1_CNI_To_kubeone_CNI is an autogenerated conversion function. -func Convert_v1beta1_CNI_To_kubeone_CNI(in *CNI, out *kubeone.CNI, s conversion.Scope) error { - return autoConvert_v1beta1_CNI_To_kubeone_CNI(in, out, s) -} - -func autoConvert_kubeone_CNI_To_v1beta1_CNI(in *kubeone.CNI, out *CNI, s conversion.Scope) error { - out.Canal = (*CanalSpec)(unsafe.Pointer(in.Canal)) - out.Cilium = (*CiliumSpec)(unsafe.Pointer(in.Cilium)) - out.WeaveNet = (*WeaveNetSpec)(unsafe.Pointer(in.WeaveNet)) - out.External = (*ExternalCNISpec)(unsafe.Pointer(in.External)) - return nil -} - -// Convert_kubeone_CNI_To_v1beta1_CNI is an autogenerated conversion function. -func Convert_kubeone_CNI_To_v1beta1_CNI(in *kubeone.CNI, out *CNI, s conversion.Scope) error { - return autoConvert_kubeone_CNI_To_v1beta1_CNI(in, out, s) -} - -func autoConvert_v1beta1_CanalSpec_To_kubeone_CanalSpec(in *CanalSpec, out *kubeone.CanalSpec, s conversion.Scope) error { - out.MTU = in.MTU - return nil -} - -// Convert_v1beta1_CanalSpec_To_kubeone_CanalSpec is an autogenerated conversion function. -func Convert_v1beta1_CanalSpec_To_kubeone_CanalSpec(in *CanalSpec, out *kubeone.CanalSpec, s conversion.Scope) error { - return autoConvert_v1beta1_CanalSpec_To_kubeone_CanalSpec(in, out, s) -} - -func autoConvert_kubeone_CanalSpec_To_v1beta1_CanalSpec(in *kubeone.CanalSpec, out *CanalSpec, s conversion.Scope) error { - out.MTU = in.MTU - return nil -} - -// Convert_kubeone_CanalSpec_To_v1beta1_CanalSpec is an autogenerated conversion function. -func Convert_kubeone_CanalSpec_To_v1beta1_CanalSpec(in *kubeone.CanalSpec, out *CanalSpec, s conversion.Scope) error { - return autoConvert_kubeone_CanalSpec_To_v1beta1_CanalSpec(in, out, s) -} - -func autoConvert_v1beta1_CiliumSpec_To_kubeone_CiliumSpec(in *CiliumSpec, out *kubeone.CiliumSpec, s conversion.Scope) error { - out.KubeProxyReplacement = kubeone.KubeProxyReplacementType(in.KubeProxyReplacement) - out.EnableHubble = in.EnableHubble - return nil -} - -// Convert_v1beta1_CiliumSpec_To_kubeone_CiliumSpec is an autogenerated conversion function. -func Convert_v1beta1_CiliumSpec_To_kubeone_CiliumSpec(in *CiliumSpec, out *kubeone.CiliumSpec, s conversion.Scope) error { - return autoConvert_v1beta1_CiliumSpec_To_kubeone_CiliumSpec(in, out, s) -} - -func autoConvert_kubeone_CiliumSpec_To_v1beta1_CiliumSpec(in *kubeone.CiliumSpec, out *CiliumSpec, s conversion.Scope) error { - out.KubeProxyReplacement = KubeProxyReplacementType(in.KubeProxyReplacement) - out.EnableHubble = in.EnableHubble - return nil -} - -// Convert_kubeone_CiliumSpec_To_v1beta1_CiliumSpec is an autogenerated conversion function. -func Convert_kubeone_CiliumSpec_To_v1beta1_CiliumSpec(in *kubeone.CiliumSpec, out *CiliumSpec, s conversion.Scope) error { - return autoConvert_kubeone_CiliumSpec_To_v1beta1_CiliumSpec(in, out, s) -} - -func autoConvert_v1beta1_CloudProviderSpec_To_kubeone_CloudProviderSpec(in *CloudProviderSpec, out *kubeone.CloudProviderSpec, s conversion.Scope) error { - out.External = in.External - out.CloudConfig = in.CloudConfig - out.CSIConfig = in.CSIConfig - out.AWS = (*kubeone.AWSSpec)(unsafe.Pointer(in.AWS)) - out.Azure = (*kubeone.AzureSpec)(unsafe.Pointer(in.Azure)) - out.DigitalOcean = (*kubeone.DigitalOceanSpec)(unsafe.Pointer(in.DigitalOcean)) - out.GCE = (*kubeone.GCESpec)(unsafe.Pointer(in.GCE)) - out.Hetzner = (*kubeone.HetznerSpec)(unsafe.Pointer(in.Hetzner)) - out.Openstack = (*kubeone.OpenstackSpec)(unsafe.Pointer(in.Openstack)) - // WARNING: in.Packet requires manual conversion: does not exist in peer-type - out.Vsphere = (*kubeone.VsphereSpec)(unsafe.Pointer(in.Vsphere)) - out.None = (*kubeone.NoneSpec)(unsafe.Pointer(in.None)) - return nil -} - -func autoConvert_kubeone_CloudProviderSpec_To_v1beta1_CloudProviderSpec(in *kubeone.CloudProviderSpec, out *CloudProviderSpec, s conversion.Scope) error { - out.External = in.External - out.CloudConfig = in.CloudConfig - out.CSIConfig = in.CSIConfig - out.AWS = (*AWSSpec)(unsafe.Pointer(in.AWS)) - out.Azure = (*AzureSpec)(unsafe.Pointer(in.Azure)) - out.DigitalOcean = (*DigitalOceanSpec)(unsafe.Pointer(in.DigitalOcean)) - out.GCE = (*GCESpec)(unsafe.Pointer(in.GCE)) - out.Hetzner = (*HetznerSpec)(unsafe.Pointer(in.Hetzner)) - out.Openstack = (*OpenstackSpec)(unsafe.Pointer(in.Openstack)) - // WARNING: in.EquinixMetal requires manual conversion: does not exist in peer-type - out.Vsphere = (*VsphereSpec)(unsafe.Pointer(in.Vsphere)) - out.None = (*NoneSpec)(unsafe.Pointer(in.None)) - return nil -} - -func autoConvert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig(in *ClusterNetworkConfig, out *kubeone.ClusterNetworkConfig, s conversion.Scope) error { - out.PodSubnet = in.PodSubnet - out.ServiceSubnet = in.ServiceSubnet - out.ServiceDomainName = in.ServiceDomainName - out.NodePortRange = in.NodePortRange - out.CNI = (*kubeone.CNI)(unsafe.Pointer(in.CNI)) - out.KubeProxy = (*kubeone.KubeProxyConfig)(unsafe.Pointer(in.KubeProxy)) - return nil -} - -// Convert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig is an autogenerated conversion function. -func Convert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig(in *ClusterNetworkConfig, out *kubeone.ClusterNetworkConfig, s conversion.Scope) error { - return autoConvert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig(in, out, s) -} - -func autoConvert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig(in *kubeone.ClusterNetworkConfig, out *ClusterNetworkConfig, s conversion.Scope) error { - out.PodSubnet = in.PodSubnet - out.ServiceSubnet = in.ServiceSubnet - out.ServiceDomainName = in.ServiceDomainName - out.NodePortRange = in.NodePortRange - out.CNI = (*CNI)(unsafe.Pointer(in.CNI)) - out.KubeProxy = (*KubeProxyConfig)(unsafe.Pointer(in.KubeProxy)) - return nil -} - -// Convert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig is an autogenerated conversion function. -func Convert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig(in *kubeone.ClusterNetworkConfig, out *ClusterNetworkConfig, s conversion.Scope) error { - return autoConvert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig(in, out, s) -} - -func autoConvert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig(in *ContainerRuntimeConfig, out *kubeone.ContainerRuntimeConfig, s conversion.Scope) error { - if in.Docker != nil { - in, out := &in.Docker, &out.Docker - *out = new(kubeone.ContainerRuntimeDocker) - if err := Convert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker(*in, *out, s); err != nil { - return err - } - } else { - out.Docker = nil - } - if in.Containerd != nil { - in, out := &in.Containerd, &out.Containerd - *out = new(kubeone.ContainerRuntimeContainerd) - if err := Convert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd(*in, *out, s); err != nil { - return err - } - } else { - out.Containerd = nil - } - return nil -} - -// Convert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig is an autogenerated conversion function. -func Convert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig(in *ContainerRuntimeConfig, out *kubeone.ContainerRuntimeConfig, s conversion.Scope) error { - return autoConvert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig(in, out, s) -} - -func autoConvert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig(in *kubeone.ContainerRuntimeConfig, out *ContainerRuntimeConfig, s conversion.Scope) error { - if in.Docker != nil { - in, out := &in.Docker, &out.Docker - *out = new(ContainerRuntimeDocker) - if err := Convert_kubeone_ContainerRuntimeDocker_To_v1beta1_ContainerRuntimeDocker(*in, *out, s); err != nil { - return err - } - } else { - out.Docker = nil - } - if in.Containerd != nil { - in, out := &in.Containerd, &out.Containerd - *out = new(ContainerRuntimeContainerd) - if err := Convert_kubeone_ContainerRuntimeContainerd_To_v1beta1_ContainerRuntimeContainerd(*in, *out, s); err != nil { - return err - } - } else { - out.Containerd = nil - } - return nil -} - -// Convert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig is an autogenerated conversion function. -func Convert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig(in *kubeone.ContainerRuntimeConfig, out *ContainerRuntimeConfig, s conversion.Scope) error { - return autoConvert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig(in, out, s) -} - -func autoConvert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd(in *ContainerRuntimeContainerd, out *kubeone.ContainerRuntimeContainerd, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd is an autogenerated conversion function. -func Convert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd(in *ContainerRuntimeContainerd, out *kubeone.ContainerRuntimeContainerd, s conversion.Scope) error { - return autoConvert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd(in, out, s) -} - -func autoConvert_kubeone_ContainerRuntimeContainerd_To_v1beta1_ContainerRuntimeContainerd(in *kubeone.ContainerRuntimeContainerd, out *ContainerRuntimeContainerd, s conversion.Scope) error { - // WARNING: in.Registries requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker(in *ContainerRuntimeDocker, out *kubeone.ContainerRuntimeDocker, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker is an autogenerated conversion function. -func Convert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker(in *ContainerRuntimeDocker, out *kubeone.ContainerRuntimeDocker, s conversion.Scope) error { - return autoConvert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker(in, out, s) -} - -func autoConvert_kubeone_ContainerRuntimeDocker_To_v1beta1_ContainerRuntimeDocker(in *kubeone.ContainerRuntimeDocker, out *ContainerRuntimeDocker, s conversion.Scope) error { - // WARNING: in.RegistryMirrors requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig(in *ControlPlaneConfig, out *kubeone.ControlPlaneConfig, s conversion.Scope) error { - if in.Hosts != nil { - in, out := &in.Hosts, &out.Hosts - *out = make([]kubeone.HostConfig, len(*in)) - for i := range *in { - if err := Convert_v1beta1_HostConfig_To_kubeone_HostConfig(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Hosts = nil - } - return nil -} - -// Convert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig is an autogenerated conversion function. -func Convert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig(in *ControlPlaneConfig, out *kubeone.ControlPlaneConfig, s conversion.Scope) error { - return autoConvert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig(in, out, s) -} - -func autoConvert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig(in *kubeone.ControlPlaneConfig, out *ControlPlaneConfig, s conversion.Scope) error { - if in.Hosts != nil { - in, out := &in.Hosts, &out.Hosts - *out = make([]HostConfig, len(*in)) - for i := range *in { - if err := Convert_kubeone_HostConfig_To_v1beta1_HostConfig(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Hosts = nil - } - return nil -} - -// Convert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig is an autogenerated conversion function. -func Convert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig(in *kubeone.ControlPlaneConfig, out *ControlPlaneConfig, s conversion.Scope) error { - return autoConvert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig(in, out, s) -} - -func autoConvert_v1beta1_DNSConfig_To_kubeone_DNSConfig(in *DNSConfig, out *kubeone.DNSConfig, s conversion.Scope) error { - out.Servers = *(*[]string)(unsafe.Pointer(&in.Servers)) - return nil -} - -// Convert_v1beta1_DNSConfig_To_kubeone_DNSConfig is an autogenerated conversion function. -func Convert_v1beta1_DNSConfig_To_kubeone_DNSConfig(in *DNSConfig, out *kubeone.DNSConfig, s conversion.Scope) error { - return autoConvert_v1beta1_DNSConfig_To_kubeone_DNSConfig(in, out, s) -} - -func autoConvert_kubeone_DNSConfig_To_v1beta1_DNSConfig(in *kubeone.DNSConfig, out *DNSConfig, s conversion.Scope) error { - out.Servers = *(*[]string)(unsafe.Pointer(&in.Servers)) - return nil -} - -// Convert_kubeone_DNSConfig_To_v1beta1_DNSConfig is an autogenerated conversion function. -func Convert_kubeone_DNSConfig_To_v1beta1_DNSConfig(in *kubeone.DNSConfig, out *DNSConfig, s conversion.Scope) error { - return autoConvert_kubeone_DNSConfig_To_v1beta1_DNSConfig(in, out, s) -} - -func autoConvert_v1beta1_DigitalOceanSpec_To_kubeone_DigitalOceanSpec(in *DigitalOceanSpec, out *kubeone.DigitalOceanSpec, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_DigitalOceanSpec_To_kubeone_DigitalOceanSpec is an autogenerated conversion function. -func Convert_v1beta1_DigitalOceanSpec_To_kubeone_DigitalOceanSpec(in *DigitalOceanSpec, out *kubeone.DigitalOceanSpec, s conversion.Scope) error { - return autoConvert_v1beta1_DigitalOceanSpec_To_kubeone_DigitalOceanSpec(in, out, s) -} - -func autoConvert_kubeone_DigitalOceanSpec_To_v1beta1_DigitalOceanSpec(in *kubeone.DigitalOceanSpec, out *DigitalOceanSpec, s conversion.Scope) error { - return nil -} - -// Convert_kubeone_DigitalOceanSpec_To_v1beta1_DigitalOceanSpec is an autogenerated conversion function. -func Convert_kubeone_DigitalOceanSpec_To_v1beta1_DigitalOceanSpec(in *kubeone.DigitalOceanSpec, out *DigitalOceanSpec, s conversion.Scope) error { - return autoConvert_kubeone_DigitalOceanSpec_To_v1beta1_DigitalOceanSpec(in, out, s) -} - -func autoConvert_v1beta1_DynamicAuditLog_To_kubeone_DynamicAuditLog(in *DynamicAuditLog, out *kubeone.DynamicAuditLog, s conversion.Scope) error { - out.Enable = in.Enable - return nil -} - -// Convert_v1beta1_DynamicAuditLog_To_kubeone_DynamicAuditLog is an autogenerated conversion function. -func Convert_v1beta1_DynamicAuditLog_To_kubeone_DynamicAuditLog(in *DynamicAuditLog, out *kubeone.DynamicAuditLog, s conversion.Scope) error { - return autoConvert_v1beta1_DynamicAuditLog_To_kubeone_DynamicAuditLog(in, out, s) -} - -func autoConvert_kubeone_DynamicAuditLog_To_v1beta1_DynamicAuditLog(in *kubeone.DynamicAuditLog, out *DynamicAuditLog, s conversion.Scope) error { - out.Enable = in.Enable - return nil -} - -// Convert_kubeone_DynamicAuditLog_To_v1beta1_DynamicAuditLog is an autogenerated conversion function. -func Convert_kubeone_DynamicAuditLog_To_v1beta1_DynamicAuditLog(in *kubeone.DynamicAuditLog, out *DynamicAuditLog, s conversion.Scope) error { - return autoConvert_kubeone_DynamicAuditLog_To_v1beta1_DynamicAuditLog(in, out, s) -} - -func autoConvert_v1beta1_DynamicWorkerConfig_To_kubeone_DynamicWorkerConfig(in *DynamicWorkerConfig, out *kubeone.DynamicWorkerConfig, s conversion.Scope) error { - out.Name = in.Name - out.Replicas = (*int)(unsafe.Pointer(in.Replicas)) - if err := Convert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec(&in.Config, &out.Config, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_DynamicWorkerConfig_To_kubeone_DynamicWorkerConfig is an autogenerated conversion function. -func Convert_v1beta1_DynamicWorkerConfig_To_kubeone_DynamicWorkerConfig(in *DynamicWorkerConfig, out *kubeone.DynamicWorkerConfig, s conversion.Scope) error { - return autoConvert_v1beta1_DynamicWorkerConfig_To_kubeone_DynamicWorkerConfig(in, out, s) -} - -func autoConvert_kubeone_DynamicWorkerConfig_To_v1beta1_DynamicWorkerConfig(in *kubeone.DynamicWorkerConfig, out *DynamicWorkerConfig, s conversion.Scope) error { - out.Name = in.Name - out.Replicas = (*int)(unsafe.Pointer(in.Replicas)) - if err := Convert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec(&in.Config, &out.Config, s); err != nil { - return err - } - return nil -} - -// Convert_kubeone_DynamicWorkerConfig_To_v1beta1_DynamicWorkerConfig is an autogenerated conversion function. -func Convert_kubeone_DynamicWorkerConfig_To_v1beta1_DynamicWorkerConfig(in *kubeone.DynamicWorkerConfig, out *DynamicWorkerConfig, s conversion.Scope) error { - return autoConvert_kubeone_DynamicWorkerConfig_To_v1beta1_DynamicWorkerConfig(in, out, s) -} - -func autoConvert_v1beta1_EncryptionProviders_To_kubeone_EncryptionProviders(in *EncryptionProviders, out *kubeone.EncryptionProviders, s conversion.Scope) error { - out.Enable = in.Enable - out.CustomEncryptionConfiguration = in.CustomEncryptionConfiguration - return nil -} - -// Convert_v1beta1_EncryptionProviders_To_kubeone_EncryptionProviders is an autogenerated conversion function. -func Convert_v1beta1_EncryptionProviders_To_kubeone_EncryptionProviders(in *EncryptionProviders, out *kubeone.EncryptionProviders, s conversion.Scope) error { - return autoConvert_v1beta1_EncryptionProviders_To_kubeone_EncryptionProviders(in, out, s) -} - -func autoConvert_kubeone_EncryptionProviders_To_v1beta1_EncryptionProviders(in *kubeone.EncryptionProviders, out *EncryptionProviders, s conversion.Scope) error { - out.Enable = in.Enable - out.CustomEncryptionConfiguration = in.CustomEncryptionConfiguration - return nil -} - -// Convert_kubeone_EncryptionProviders_To_v1beta1_EncryptionProviders is an autogenerated conversion function. -func Convert_kubeone_EncryptionProviders_To_v1beta1_EncryptionProviders(in *kubeone.EncryptionProviders, out *EncryptionProviders, s conversion.Scope) error { - return autoConvert_kubeone_EncryptionProviders_To_v1beta1_EncryptionProviders(in, out, s) -} - -func autoConvert_v1beta1_ExternalCNISpec_To_kubeone_ExternalCNISpec(in *ExternalCNISpec, out *kubeone.ExternalCNISpec, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_ExternalCNISpec_To_kubeone_ExternalCNISpec is an autogenerated conversion function. -func Convert_v1beta1_ExternalCNISpec_To_kubeone_ExternalCNISpec(in *ExternalCNISpec, out *kubeone.ExternalCNISpec, s conversion.Scope) error { - return autoConvert_v1beta1_ExternalCNISpec_To_kubeone_ExternalCNISpec(in, out, s) -} - -func autoConvert_kubeone_ExternalCNISpec_To_v1beta1_ExternalCNISpec(in *kubeone.ExternalCNISpec, out *ExternalCNISpec, s conversion.Scope) error { - return nil -} - -// Convert_kubeone_ExternalCNISpec_To_v1beta1_ExternalCNISpec is an autogenerated conversion function. -func Convert_kubeone_ExternalCNISpec_To_v1beta1_ExternalCNISpec(in *kubeone.ExternalCNISpec, out *ExternalCNISpec, s conversion.Scope) error { - return autoConvert_kubeone_ExternalCNISpec_To_v1beta1_ExternalCNISpec(in, out, s) -} - -func autoConvert_v1beta1_Features_To_kubeone_Features(in *Features, out *kubeone.Features, s conversion.Scope) error { - out.PodNodeSelector = (*kubeone.PodNodeSelector)(unsafe.Pointer(in.PodNodeSelector)) - // WARNING: in.PodPresets requires manual conversion: does not exist in peer-type - out.PodSecurityPolicy = (*kubeone.PodSecurityPolicy)(unsafe.Pointer(in.PodSecurityPolicy)) - out.StaticAuditLog = (*kubeone.StaticAuditLog)(unsafe.Pointer(in.StaticAuditLog)) - out.DynamicAuditLog = (*kubeone.DynamicAuditLog)(unsafe.Pointer(in.DynamicAuditLog)) - out.MetricsServer = (*kubeone.MetricsServer)(unsafe.Pointer(in.MetricsServer)) - out.OpenIDConnect = (*kubeone.OpenIDConnect)(unsafe.Pointer(in.OpenIDConnect)) - out.EncryptionProviders = (*kubeone.EncryptionProviders)(unsafe.Pointer(in.EncryptionProviders)) - return nil -} - -func autoConvert_kubeone_Features_To_v1beta1_Features(in *kubeone.Features, out *Features, s conversion.Scope) error { - out.PodNodeSelector = (*PodNodeSelector)(unsafe.Pointer(in.PodNodeSelector)) - out.PodSecurityPolicy = (*PodSecurityPolicy)(unsafe.Pointer(in.PodSecurityPolicy)) - out.StaticAuditLog = (*StaticAuditLog)(unsafe.Pointer(in.StaticAuditLog)) - out.DynamicAuditLog = (*DynamicAuditLog)(unsafe.Pointer(in.DynamicAuditLog)) - out.MetricsServer = (*MetricsServer)(unsafe.Pointer(in.MetricsServer)) - out.OpenIDConnect = (*OpenIDConnect)(unsafe.Pointer(in.OpenIDConnect)) - out.EncryptionProviders = (*EncryptionProviders)(unsafe.Pointer(in.EncryptionProviders)) - return nil -} - -// Convert_kubeone_Features_To_v1beta1_Features is an autogenerated conversion function. -func Convert_kubeone_Features_To_v1beta1_Features(in *kubeone.Features, out *Features, s conversion.Scope) error { - return autoConvert_kubeone_Features_To_v1beta1_Features(in, out, s) -} - -func autoConvert_v1beta1_GCESpec_To_kubeone_GCESpec(in *GCESpec, out *kubeone.GCESpec, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_GCESpec_To_kubeone_GCESpec is an autogenerated conversion function. -func Convert_v1beta1_GCESpec_To_kubeone_GCESpec(in *GCESpec, out *kubeone.GCESpec, s conversion.Scope) error { - return autoConvert_v1beta1_GCESpec_To_kubeone_GCESpec(in, out, s) -} - -func autoConvert_kubeone_GCESpec_To_v1beta1_GCESpec(in *kubeone.GCESpec, out *GCESpec, s conversion.Scope) error { - return nil -} - -// Convert_kubeone_GCESpec_To_v1beta1_GCESpec is an autogenerated conversion function. -func Convert_kubeone_GCESpec_To_v1beta1_GCESpec(in *kubeone.GCESpec, out *GCESpec, s conversion.Scope) error { - return autoConvert_kubeone_GCESpec_To_v1beta1_GCESpec(in, out, s) -} - -func autoConvert_v1beta1_HetznerSpec_To_kubeone_HetznerSpec(in *HetznerSpec, out *kubeone.HetznerSpec, s conversion.Scope) error { - out.NetworkID = in.NetworkID - return nil -} - -// Convert_v1beta1_HetznerSpec_To_kubeone_HetznerSpec is an autogenerated conversion function. -func Convert_v1beta1_HetznerSpec_To_kubeone_HetznerSpec(in *HetznerSpec, out *kubeone.HetznerSpec, s conversion.Scope) error { - return autoConvert_v1beta1_HetznerSpec_To_kubeone_HetznerSpec(in, out, s) -} - -func autoConvert_kubeone_HetznerSpec_To_v1beta1_HetznerSpec(in *kubeone.HetznerSpec, out *HetznerSpec, s conversion.Scope) error { - out.NetworkID = in.NetworkID - return nil -} - -// Convert_kubeone_HetznerSpec_To_v1beta1_HetznerSpec is an autogenerated conversion function. -func Convert_kubeone_HetznerSpec_To_v1beta1_HetznerSpec(in *kubeone.HetznerSpec, out *HetznerSpec, s conversion.Scope) error { - return autoConvert_kubeone_HetznerSpec_To_v1beta1_HetznerSpec(in, out, s) -} - -func autoConvert_v1beta1_HostConfig_To_kubeone_HostConfig(in *HostConfig, out *kubeone.HostConfig, s conversion.Scope) error { - out.ID = in.ID - out.PublicAddress = in.PublicAddress - out.PrivateAddress = in.PrivateAddress - out.SSHPort = in.SSHPort - out.SSHUsername = in.SSHUsername - out.SSHPrivateKeyFile = in.SSHPrivateKeyFile - out.SSHAgentSocket = in.SSHAgentSocket - out.Bastion = in.Bastion - out.BastionPort = in.BastionPort - out.BastionUser = in.BastionUser - out.Hostname = in.Hostname - out.IsLeader = in.IsLeader - out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) - out.OperatingSystem = kubeone.OperatingSystemName(in.OperatingSystem) - return nil -} - -// Convert_v1beta1_HostConfig_To_kubeone_HostConfig is an autogenerated conversion function. -func Convert_v1beta1_HostConfig_To_kubeone_HostConfig(in *HostConfig, out *kubeone.HostConfig, s conversion.Scope) error { - return autoConvert_v1beta1_HostConfig_To_kubeone_HostConfig(in, out, s) -} - -func autoConvert_kubeone_HostConfig_To_v1beta1_HostConfig(in *kubeone.HostConfig, out *HostConfig, s conversion.Scope) error { - out.ID = in.ID - out.PublicAddress = in.PublicAddress - out.PrivateAddress = in.PrivateAddress - out.SSHPort = in.SSHPort - out.SSHUsername = in.SSHUsername - out.SSHPrivateKeyFile = in.SSHPrivateKeyFile - out.SSHAgentSocket = in.SSHAgentSocket - out.Bastion = in.Bastion - out.BastionPort = in.BastionPort - out.BastionUser = in.BastionUser - out.Hostname = in.Hostname - out.IsLeader = in.IsLeader - out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) - // WARNING: in.Kubelet requires manual conversion: does not exist in peer-type - out.OperatingSystem = OperatingSystemName(in.OperatingSystem) - return nil -} - -func autoConvert_v1beta1_IPTables_To_kubeone_IPTables(in *IPTables, out *kubeone.IPTables, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_IPTables_To_kubeone_IPTables is an autogenerated conversion function. -func Convert_v1beta1_IPTables_To_kubeone_IPTables(in *IPTables, out *kubeone.IPTables, s conversion.Scope) error { - return autoConvert_v1beta1_IPTables_To_kubeone_IPTables(in, out, s) -} - -func autoConvert_kubeone_IPTables_To_v1beta1_IPTables(in *kubeone.IPTables, out *IPTables, s conversion.Scope) error { - return nil -} - -// Convert_kubeone_IPTables_To_v1beta1_IPTables is an autogenerated conversion function. -func Convert_kubeone_IPTables_To_v1beta1_IPTables(in *kubeone.IPTables, out *IPTables, s conversion.Scope) error { - return autoConvert_kubeone_IPTables_To_v1beta1_IPTables(in, out, s) -} - -func autoConvert_v1beta1_IPVSConfig_To_kubeone_IPVSConfig(in *IPVSConfig, out *kubeone.IPVSConfig, s conversion.Scope) error { - out.Scheduler = in.Scheduler - out.ExcludeCIDRs = *(*[]string)(unsafe.Pointer(&in.ExcludeCIDRs)) - out.StrictARP = in.StrictARP - out.TCPTimeout = in.TCPTimeout - out.TCPFinTimeout = in.TCPFinTimeout - out.UDPTimeout = in.UDPTimeout - return nil -} - -// Convert_v1beta1_IPVSConfig_To_kubeone_IPVSConfig is an autogenerated conversion function. -func Convert_v1beta1_IPVSConfig_To_kubeone_IPVSConfig(in *IPVSConfig, out *kubeone.IPVSConfig, s conversion.Scope) error { - return autoConvert_v1beta1_IPVSConfig_To_kubeone_IPVSConfig(in, out, s) -} - -func autoConvert_kubeone_IPVSConfig_To_v1beta1_IPVSConfig(in *kubeone.IPVSConfig, out *IPVSConfig, s conversion.Scope) error { - out.Scheduler = in.Scheduler - out.ExcludeCIDRs = *(*[]string)(unsafe.Pointer(&in.ExcludeCIDRs)) - out.StrictARP = in.StrictARP - out.TCPTimeout = in.TCPTimeout - out.TCPFinTimeout = in.TCPFinTimeout - out.UDPTimeout = in.UDPTimeout - return nil -} - -// Convert_kubeone_IPVSConfig_To_v1beta1_IPVSConfig is an autogenerated conversion function. -func Convert_kubeone_IPVSConfig_To_v1beta1_IPVSConfig(in *kubeone.IPVSConfig, out *IPVSConfig, s conversion.Scope) error { - return autoConvert_kubeone_IPVSConfig_To_v1beta1_IPVSConfig(in, out, s) -} - -func autoConvert_v1beta1_ImageAsset_To_kubeone_ImageAsset(in *ImageAsset, out *kubeone.ImageAsset, s conversion.Scope) error { - out.ImageRepository = in.ImageRepository - out.ImageTag = in.ImageTag - return nil -} - -// Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset is an autogenerated conversion function. -func Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(in *ImageAsset, out *kubeone.ImageAsset, s conversion.Scope) error { - return autoConvert_v1beta1_ImageAsset_To_kubeone_ImageAsset(in, out, s) -} - -func autoConvert_kubeone_ImageAsset_To_v1beta1_ImageAsset(in *kubeone.ImageAsset, out *ImageAsset, s conversion.Scope) error { - out.ImageRepository = in.ImageRepository - out.ImageTag = in.ImageTag - return nil -} - -// Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset is an autogenerated conversion function. -func Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(in *kubeone.ImageAsset, out *ImageAsset, s conversion.Scope) error { - return autoConvert_kubeone_ImageAsset_To_v1beta1_ImageAsset(in, out, s) -} - -func autoConvert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneCluster, out *kubeone.KubeOneCluster, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig(&in.ControlPlane, &out.ControlPlane, s); err != nil { - return err - } - if err := Convert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint(&in.APIEndpoint, &out.APIEndpoint, s); err != nil { - return err - } - if err := Convert_v1beta1_CloudProviderSpec_To_kubeone_CloudProviderSpec(&in.CloudProvider, &out.CloudProvider, s); err != nil { - return err - } - if err := Convert_v1beta1_VersionConfig_To_kubeone_VersionConfig(&in.Versions, &out.Versions, s); err != nil { - return err - } - if err := Convert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig(&in.ContainerRuntime, &out.ContainerRuntime, s); err != nil { - return err - } - if err := Convert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig(&in.ClusterNetwork, &out.ClusterNetwork, s); err != nil { - return err - } - if err := Convert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig(&in.Proxy, &out.Proxy, s); err != nil { - return err - } - if err := Convert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig(&in.StaticWorkers, &out.StaticWorkers, s); err != nil { - return err - } - out.DynamicWorkers = *(*[]kubeone.DynamicWorkerConfig)(unsafe.Pointer(&in.DynamicWorkers)) - out.MachineController = (*kubeone.MachineControllerConfig)(unsafe.Pointer(in.MachineController)) - out.CABundle = in.CABundle - if err := Convert_v1beta1_Features_To_kubeone_Features(&in.Features, &out.Features, s); err != nil { - return err - } - out.Addons = (*kubeone.Addons)(unsafe.Pointer(in.Addons)) - out.SystemPackages = (*kubeone.SystemPackages)(unsafe.Pointer(in.SystemPackages)) - if err := Convert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration(&in.AssetConfiguration, &out.AssetConfiguration, s); err != nil { - return err - } - out.RegistryConfiguration = (*kubeone.RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - return nil -} - -// Convert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster is an autogenerated conversion function. -func Convert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneCluster, out *kubeone.KubeOneCluster, s conversion.Scope) error { - return autoConvert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(in, out, s) -} - -func autoConvert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in *kubeone.KubeOneCluster, out *KubeOneCluster, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig(&in.ControlPlane, &out.ControlPlane, s); err != nil { - return err - } - if err := Convert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint(&in.APIEndpoint, &out.APIEndpoint, s); err != nil { - return err - } - if err := Convert_kubeone_CloudProviderSpec_To_v1beta1_CloudProviderSpec(&in.CloudProvider, &out.CloudProvider, s); err != nil { - return err - } - if err := Convert_kubeone_VersionConfig_To_v1beta1_VersionConfig(&in.Versions, &out.Versions, s); err != nil { - return err - } - if err := Convert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig(&in.ContainerRuntime, &out.ContainerRuntime, s); err != nil { - return err - } - if err := Convert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig(&in.ClusterNetwork, &out.ClusterNetwork, s); err != nil { - return err - } - if err := Convert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig(&in.Proxy, &out.Proxy, s); err != nil { - return err - } - if err := Convert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig(&in.StaticWorkers, &out.StaticWorkers, s); err != nil { - return err - } - out.DynamicWorkers = *(*[]DynamicWorkerConfig)(unsafe.Pointer(&in.DynamicWorkers)) - out.MachineController = (*MachineControllerConfig)(unsafe.Pointer(in.MachineController)) - out.CABundle = in.CABundle - if err := Convert_kubeone_Features_To_v1beta1_Features(&in.Features, &out.Features, s); err != nil { - return err - } - out.Addons = (*Addons)(unsafe.Pointer(in.Addons)) - out.SystemPackages = (*SystemPackages)(unsafe.Pointer(in.SystemPackages)) - if err := Convert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration(&in.AssetConfiguration, &out.AssetConfiguration, s); err != nil { - return err - } - out.RegistryConfiguration = (*RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - // WARNING: in.KubeletConfiguration requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig(in *KubeProxyConfig, out *kubeone.KubeProxyConfig, s conversion.Scope) error { - out.SkipInstallation = in.SkipInstallation - out.IPVS = (*kubeone.IPVSConfig)(unsafe.Pointer(in.IPVS)) - out.IPTables = (*kubeone.IPTables)(unsafe.Pointer(in.IPTables)) - return nil -} - -// Convert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig is an autogenerated conversion function. -func Convert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig(in *KubeProxyConfig, out *kubeone.KubeProxyConfig, s conversion.Scope) error { - return autoConvert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig(in, out, s) -} - -func autoConvert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *kubeone.KubeProxyConfig, out *KubeProxyConfig, s conversion.Scope) error { - out.SkipInstallation = in.SkipInstallation - out.IPVS = (*IPVSConfig)(unsafe.Pointer(in.IPVS)) - out.IPTables = (*IPTables)(unsafe.Pointer(in.IPTables)) - return nil -} - -// Convert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig is an autogenerated conversion function. -func Convert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *kubeone.KubeProxyConfig, out *KubeProxyConfig, s conversion.Scope) error { - return autoConvert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in, out, s) -} - -func autoConvert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(in *MachineControllerConfig, out *kubeone.MachineControllerConfig, s conversion.Scope) error { - out.Deploy = in.Deploy - return nil -} - -// Convert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig is an autogenerated conversion function. -func Convert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(in *MachineControllerConfig, out *kubeone.MachineControllerConfig, s conversion.Scope) error { - return autoConvert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(in, out, s) -} - -func autoConvert_kubeone_MachineControllerConfig_To_v1beta1_MachineControllerConfig(in *kubeone.MachineControllerConfig, out *MachineControllerConfig, s conversion.Scope) error { - out.Deploy = in.Deploy - return nil -} - -// Convert_kubeone_MachineControllerConfig_To_v1beta1_MachineControllerConfig is an autogenerated conversion function. -func Convert_kubeone_MachineControllerConfig_To_v1beta1_MachineControllerConfig(in *kubeone.MachineControllerConfig, out *MachineControllerConfig, s conversion.Scope) error { - return autoConvert_kubeone_MachineControllerConfig_To_v1beta1_MachineControllerConfig(in, out, s) -} - -func autoConvert_v1beta1_MetricsServer_To_kubeone_MetricsServer(in *MetricsServer, out *kubeone.MetricsServer, s conversion.Scope) error { - out.Enable = in.Enable - return nil -} - -// Convert_v1beta1_MetricsServer_To_kubeone_MetricsServer is an autogenerated conversion function. -func Convert_v1beta1_MetricsServer_To_kubeone_MetricsServer(in *MetricsServer, out *kubeone.MetricsServer, s conversion.Scope) error { - return autoConvert_v1beta1_MetricsServer_To_kubeone_MetricsServer(in, out, s) -} - -func autoConvert_kubeone_MetricsServer_To_v1beta1_MetricsServer(in *kubeone.MetricsServer, out *MetricsServer, s conversion.Scope) error { - out.Enable = in.Enable - return nil -} - -// Convert_kubeone_MetricsServer_To_v1beta1_MetricsServer is an autogenerated conversion function. -func Convert_kubeone_MetricsServer_To_v1beta1_MetricsServer(in *kubeone.MetricsServer, out *MetricsServer, s conversion.Scope) error { - return autoConvert_kubeone_MetricsServer_To_v1beta1_MetricsServer(in, out, s) -} - -func autoConvert_v1beta1_NoneSpec_To_kubeone_NoneSpec(in *NoneSpec, out *kubeone.NoneSpec, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_NoneSpec_To_kubeone_NoneSpec is an autogenerated conversion function. -func Convert_v1beta1_NoneSpec_To_kubeone_NoneSpec(in *NoneSpec, out *kubeone.NoneSpec, s conversion.Scope) error { - return autoConvert_v1beta1_NoneSpec_To_kubeone_NoneSpec(in, out, s) -} - -func autoConvert_kubeone_NoneSpec_To_v1beta1_NoneSpec(in *kubeone.NoneSpec, out *NoneSpec, s conversion.Scope) error { - return nil -} - -// Convert_kubeone_NoneSpec_To_v1beta1_NoneSpec is an autogenerated conversion function. -func Convert_kubeone_NoneSpec_To_v1beta1_NoneSpec(in *kubeone.NoneSpec, out *NoneSpec, s conversion.Scope) error { - return autoConvert_kubeone_NoneSpec_To_v1beta1_NoneSpec(in, out, s) -} - -func autoConvert_v1beta1_OpenIDConnect_To_kubeone_OpenIDConnect(in *OpenIDConnect, out *kubeone.OpenIDConnect, s conversion.Scope) error { - out.Enable = in.Enable - if err := Convert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(&in.Config, &out.Config, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_OpenIDConnect_To_kubeone_OpenIDConnect is an autogenerated conversion function. -func Convert_v1beta1_OpenIDConnect_To_kubeone_OpenIDConnect(in *OpenIDConnect, out *kubeone.OpenIDConnect, s conversion.Scope) error { - return autoConvert_v1beta1_OpenIDConnect_To_kubeone_OpenIDConnect(in, out, s) -} - -func autoConvert_kubeone_OpenIDConnect_To_v1beta1_OpenIDConnect(in *kubeone.OpenIDConnect, out *OpenIDConnect, s conversion.Scope) error { - out.Enable = in.Enable - if err := Convert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig(&in.Config, &out.Config, s); err != nil { - return err - } - return nil -} - -// Convert_kubeone_OpenIDConnect_To_v1beta1_OpenIDConnect is an autogenerated conversion function. -func Convert_kubeone_OpenIDConnect_To_v1beta1_OpenIDConnect(in *kubeone.OpenIDConnect, out *OpenIDConnect, s conversion.Scope) error { - return autoConvert_kubeone_OpenIDConnect_To_v1beta1_OpenIDConnect(in, out, s) -} - -func autoConvert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(in *OpenIDConnectConfig, out *kubeone.OpenIDConnectConfig, s conversion.Scope) error { - out.IssuerURL = in.IssuerURL - out.ClientID = in.ClientID - out.UsernameClaim = in.UsernameClaim - out.UsernamePrefix = in.UsernamePrefix - out.GroupsClaim = in.GroupsClaim - out.GroupsPrefix = in.GroupsPrefix - out.RequiredClaim = in.RequiredClaim - out.SigningAlgs = in.SigningAlgs - out.CAFile = in.CAFile - return nil -} - -// Convert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig is an autogenerated conversion function. -func Convert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(in *OpenIDConnectConfig, out *kubeone.OpenIDConnectConfig, s conversion.Scope) error { - return autoConvert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(in, out, s) -} - -func autoConvert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig(in *kubeone.OpenIDConnectConfig, out *OpenIDConnectConfig, s conversion.Scope) error { - out.IssuerURL = in.IssuerURL - out.ClientID = in.ClientID - out.UsernameClaim = in.UsernameClaim - out.UsernamePrefix = in.UsernamePrefix - out.GroupsClaim = in.GroupsClaim - out.GroupsPrefix = in.GroupsPrefix - out.RequiredClaim = in.RequiredClaim - out.SigningAlgs = in.SigningAlgs - out.CAFile = in.CAFile - return nil -} - -// Convert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig is an autogenerated conversion function. -func Convert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig(in *kubeone.OpenIDConnectConfig, out *OpenIDConnectConfig, s conversion.Scope) error { - return autoConvert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig(in, out, s) -} - -func autoConvert_v1beta1_OpenstackSpec_To_kubeone_OpenstackSpec(in *OpenstackSpec, out *kubeone.OpenstackSpec, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_OpenstackSpec_To_kubeone_OpenstackSpec is an autogenerated conversion function. -func Convert_v1beta1_OpenstackSpec_To_kubeone_OpenstackSpec(in *OpenstackSpec, out *kubeone.OpenstackSpec, s conversion.Scope) error { - return autoConvert_v1beta1_OpenstackSpec_To_kubeone_OpenstackSpec(in, out, s) -} - -func autoConvert_kubeone_OpenstackSpec_To_v1beta1_OpenstackSpec(in *kubeone.OpenstackSpec, out *OpenstackSpec, s conversion.Scope) error { - return nil -} - -// Convert_kubeone_OpenstackSpec_To_v1beta1_OpenstackSpec is an autogenerated conversion function. -func Convert_kubeone_OpenstackSpec_To_v1beta1_OpenstackSpec(in *kubeone.OpenstackSpec, out *OpenstackSpec, s conversion.Scope) error { - return autoConvert_kubeone_OpenstackSpec_To_v1beta1_OpenstackSpec(in, out, s) -} - -func autoConvert_v1beta1_PodNodeSelector_To_kubeone_PodNodeSelector(in *PodNodeSelector, out *kubeone.PodNodeSelector, s conversion.Scope) error { - out.Enable = in.Enable - if err := Convert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig(&in.Config, &out.Config, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_PodNodeSelector_To_kubeone_PodNodeSelector is an autogenerated conversion function. -func Convert_v1beta1_PodNodeSelector_To_kubeone_PodNodeSelector(in *PodNodeSelector, out *kubeone.PodNodeSelector, s conversion.Scope) error { - return autoConvert_v1beta1_PodNodeSelector_To_kubeone_PodNodeSelector(in, out, s) -} - -func autoConvert_kubeone_PodNodeSelector_To_v1beta1_PodNodeSelector(in *kubeone.PodNodeSelector, out *PodNodeSelector, s conversion.Scope) error { - out.Enable = in.Enable - if err := Convert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig(&in.Config, &out.Config, s); err != nil { - return err - } - return nil -} - -// Convert_kubeone_PodNodeSelector_To_v1beta1_PodNodeSelector is an autogenerated conversion function. -func Convert_kubeone_PodNodeSelector_To_v1beta1_PodNodeSelector(in *kubeone.PodNodeSelector, out *PodNodeSelector, s conversion.Scope) error { - return autoConvert_kubeone_PodNodeSelector_To_v1beta1_PodNodeSelector(in, out, s) -} - -func autoConvert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig(in *PodNodeSelectorConfig, out *kubeone.PodNodeSelectorConfig, s conversion.Scope) error { - out.ConfigFilePath = in.ConfigFilePath - return nil -} - -// Convert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig is an autogenerated conversion function. -func Convert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig(in *PodNodeSelectorConfig, out *kubeone.PodNodeSelectorConfig, s conversion.Scope) error { - return autoConvert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig(in, out, s) -} - -func autoConvert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig(in *kubeone.PodNodeSelectorConfig, out *PodNodeSelectorConfig, s conversion.Scope) error { - out.ConfigFilePath = in.ConfigFilePath - return nil -} - -// Convert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig is an autogenerated conversion function. -func Convert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig(in *kubeone.PodNodeSelectorConfig, out *PodNodeSelectorConfig, s conversion.Scope) error { - return autoConvert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig(in, out, s) -} - -func autoConvert_v1beta1_PodSecurityPolicy_To_kubeone_PodSecurityPolicy(in *PodSecurityPolicy, out *kubeone.PodSecurityPolicy, s conversion.Scope) error { - out.Enable = in.Enable - return nil -} - -// Convert_v1beta1_PodSecurityPolicy_To_kubeone_PodSecurityPolicy is an autogenerated conversion function. -func Convert_v1beta1_PodSecurityPolicy_To_kubeone_PodSecurityPolicy(in *PodSecurityPolicy, out *kubeone.PodSecurityPolicy, s conversion.Scope) error { - return autoConvert_v1beta1_PodSecurityPolicy_To_kubeone_PodSecurityPolicy(in, out, s) -} - -func autoConvert_kubeone_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *kubeone.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error { - out.Enable = in.Enable - return nil -} - -// Convert_kubeone_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy is an autogenerated conversion function. -func Convert_kubeone_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *kubeone.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error { - return autoConvert_kubeone_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in, out, s) -} - -func autoConvert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec(in *ProviderSpec, out *kubeone.ProviderSpec, s conversion.Scope) error { - out.CloudProviderSpec = *(*json.RawMessage)(unsafe.Pointer(&in.CloudProviderSpec)) - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.MachineAnnotations = *(*map[string]string)(unsafe.Pointer(&in.MachineAnnotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) - out.SSHPublicKeys = *(*[]string)(unsafe.Pointer(&in.SSHPublicKeys)) - out.OperatingSystem = in.OperatingSystem - out.OperatingSystemSpec = *(*json.RawMessage)(unsafe.Pointer(&in.OperatingSystemSpec)) - out.Network = (*kubeone.ProviderStaticNetworkConfig)(unsafe.Pointer(in.Network)) - out.OverwriteCloudConfig = (*string)(unsafe.Pointer(in.OverwriteCloudConfig)) - return nil -} - -// Convert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec is an autogenerated conversion function. -func Convert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec(in *ProviderSpec, out *kubeone.ProviderSpec, s conversion.Scope) error { - return autoConvert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec(in, out, s) -} - -func autoConvert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec(in *kubeone.ProviderSpec, out *ProviderSpec, s conversion.Scope) error { - out.CloudProviderSpec = *(*json.RawMessage)(unsafe.Pointer(&in.CloudProviderSpec)) - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.MachineAnnotations = *(*map[string]string)(unsafe.Pointer(&in.MachineAnnotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) - out.SSHPublicKeys = *(*[]string)(unsafe.Pointer(&in.SSHPublicKeys)) - out.OperatingSystem = in.OperatingSystem - out.OperatingSystemSpec = *(*json.RawMessage)(unsafe.Pointer(&in.OperatingSystemSpec)) - out.Network = (*ProviderStaticNetworkConfig)(unsafe.Pointer(in.Network)) - out.OverwriteCloudConfig = (*string)(unsafe.Pointer(in.OverwriteCloudConfig)) - return nil -} - -// Convert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec is an autogenerated conversion function. -func Convert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec(in *kubeone.ProviderSpec, out *ProviderSpec, s conversion.Scope) error { - return autoConvert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec(in, out, s) -} - -func autoConvert_v1beta1_ProviderStaticNetworkConfig_To_kubeone_ProviderStaticNetworkConfig(in *ProviderStaticNetworkConfig, out *kubeone.ProviderStaticNetworkConfig, s conversion.Scope) error { - out.CIDR = in.CIDR - out.Gateway = in.Gateway - if err := Convert_v1beta1_DNSConfig_To_kubeone_DNSConfig(&in.DNS, &out.DNS, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_ProviderStaticNetworkConfig_To_kubeone_ProviderStaticNetworkConfig is an autogenerated conversion function. -func Convert_v1beta1_ProviderStaticNetworkConfig_To_kubeone_ProviderStaticNetworkConfig(in *ProviderStaticNetworkConfig, out *kubeone.ProviderStaticNetworkConfig, s conversion.Scope) error { - return autoConvert_v1beta1_ProviderStaticNetworkConfig_To_kubeone_ProviderStaticNetworkConfig(in, out, s) -} - -func autoConvert_kubeone_ProviderStaticNetworkConfig_To_v1beta1_ProviderStaticNetworkConfig(in *kubeone.ProviderStaticNetworkConfig, out *ProviderStaticNetworkConfig, s conversion.Scope) error { - out.CIDR = in.CIDR - out.Gateway = in.Gateway - if err := Convert_kubeone_DNSConfig_To_v1beta1_DNSConfig(&in.DNS, &out.DNS, s); err != nil { - return err - } - return nil -} - -// Convert_kubeone_ProviderStaticNetworkConfig_To_v1beta1_ProviderStaticNetworkConfig is an autogenerated conversion function. -func Convert_kubeone_ProviderStaticNetworkConfig_To_v1beta1_ProviderStaticNetworkConfig(in *kubeone.ProviderStaticNetworkConfig, out *ProviderStaticNetworkConfig, s conversion.Scope) error { - return autoConvert_kubeone_ProviderStaticNetworkConfig_To_v1beta1_ProviderStaticNetworkConfig(in, out, s) -} - -func autoConvert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig(in *ProxyConfig, out *kubeone.ProxyConfig, s conversion.Scope) error { - out.HTTP = in.HTTP - out.HTTPS = in.HTTPS - out.NoProxy = in.NoProxy - return nil -} - -// Convert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig is an autogenerated conversion function. -func Convert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig(in *ProxyConfig, out *kubeone.ProxyConfig, s conversion.Scope) error { - return autoConvert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig(in, out, s) -} - -func autoConvert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig(in *kubeone.ProxyConfig, out *ProxyConfig, s conversion.Scope) error { - out.HTTP = in.HTTP - out.HTTPS = in.HTTPS - out.NoProxy = in.NoProxy - return nil -} - -// Convert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig is an autogenerated conversion function. -func Convert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig(in *kubeone.ProxyConfig, out *ProxyConfig, s conversion.Scope) error { - return autoConvert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig(in, out, s) -} - -func autoConvert_v1beta1_RegistryConfiguration_To_kubeone_RegistryConfiguration(in *RegistryConfiguration, out *kubeone.RegistryConfiguration, s conversion.Scope) error { - out.OverwriteRegistry = in.OverwriteRegistry - out.InsecureRegistry = in.InsecureRegistry - return nil -} - -// Convert_v1beta1_RegistryConfiguration_To_kubeone_RegistryConfiguration is an autogenerated conversion function. -func Convert_v1beta1_RegistryConfiguration_To_kubeone_RegistryConfiguration(in *RegistryConfiguration, out *kubeone.RegistryConfiguration, s conversion.Scope) error { - return autoConvert_v1beta1_RegistryConfiguration_To_kubeone_RegistryConfiguration(in, out, s) -} - -func autoConvert_kubeone_RegistryConfiguration_To_v1beta1_RegistryConfiguration(in *kubeone.RegistryConfiguration, out *RegistryConfiguration, s conversion.Scope) error { - out.OverwriteRegistry = in.OverwriteRegistry - out.InsecureRegistry = in.InsecureRegistry - return nil -} - -// Convert_kubeone_RegistryConfiguration_To_v1beta1_RegistryConfiguration is an autogenerated conversion function. -func Convert_kubeone_RegistryConfiguration_To_v1beta1_RegistryConfiguration(in *kubeone.RegistryConfiguration, out *RegistryConfiguration, s conversion.Scope) error { - return autoConvert_kubeone_RegistryConfiguration_To_v1beta1_RegistryConfiguration(in, out, s) -} - -func autoConvert_v1beta1_StaticAuditLog_To_kubeone_StaticAuditLog(in *StaticAuditLog, out *kubeone.StaticAuditLog, s conversion.Scope) error { - out.Enable = in.Enable - if err := Convert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig(&in.Config, &out.Config, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_StaticAuditLog_To_kubeone_StaticAuditLog is an autogenerated conversion function. -func Convert_v1beta1_StaticAuditLog_To_kubeone_StaticAuditLog(in *StaticAuditLog, out *kubeone.StaticAuditLog, s conversion.Scope) error { - return autoConvert_v1beta1_StaticAuditLog_To_kubeone_StaticAuditLog(in, out, s) -} - -func autoConvert_kubeone_StaticAuditLog_To_v1beta1_StaticAuditLog(in *kubeone.StaticAuditLog, out *StaticAuditLog, s conversion.Scope) error { - out.Enable = in.Enable - if err := Convert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig(&in.Config, &out.Config, s); err != nil { - return err - } - return nil -} - -// Convert_kubeone_StaticAuditLog_To_v1beta1_StaticAuditLog is an autogenerated conversion function. -func Convert_kubeone_StaticAuditLog_To_v1beta1_StaticAuditLog(in *kubeone.StaticAuditLog, out *StaticAuditLog, s conversion.Scope) error { - return autoConvert_kubeone_StaticAuditLog_To_v1beta1_StaticAuditLog(in, out, s) -} - -func autoConvert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig(in *StaticAuditLogConfig, out *kubeone.StaticAuditLogConfig, s conversion.Scope) error { - out.PolicyFilePath = in.PolicyFilePath - out.LogPath = in.LogPath - out.LogMaxAge = in.LogMaxAge - out.LogMaxBackup = in.LogMaxBackup - out.LogMaxSize = in.LogMaxSize - return nil -} - -// Convert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig is an autogenerated conversion function. -func Convert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig(in *StaticAuditLogConfig, out *kubeone.StaticAuditLogConfig, s conversion.Scope) error { - return autoConvert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig(in, out, s) -} - -func autoConvert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig(in *kubeone.StaticAuditLogConfig, out *StaticAuditLogConfig, s conversion.Scope) error { - out.PolicyFilePath = in.PolicyFilePath - out.LogPath = in.LogPath - out.LogMaxAge = in.LogMaxAge - out.LogMaxBackup = in.LogMaxBackup - out.LogMaxSize = in.LogMaxSize - return nil -} - -// Convert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig is an autogenerated conversion function. -func Convert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig(in *kubeone.StaticAuditLogConfig, out *StaticAuditLogConfig, s conversion.Scope) error { - return autoConvert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig(in, out, s) -} - -func autoConvert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig(in *StaticWorkersConfig, out *kubeone.StaticWorkersConfig, s conversion.Scope) error { - if in.Hosts != nil { - in, out := &in.Hosts, &out.Hosts - *out = make([]kubeone.HostConfig, len(*in)) - for i := range *in { - if err := Convert_v1beta1_HostConfig_To_kubeone_HostConfig(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Hosts = nil - } - return nil -} - -// Convert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig is an autogenerated conversion function. -func Convert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig(in *StaticWorkersConfig, out *kubeone.StaticWorkersConfig, s conversion.Scope) error { - return autoConvert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig(in, out, s) -} - -func autoConvert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig(in *kubeone.StaticWorkersConfig, out *StaticWorkersConfig, s conversion.Scope) error { - if in.Hosts != nil { - in, out := &in.Hosts, &out.Hosts - *out = make([]HostConfig, len(*in)) - for i := range *in { - if err := Convert_kubeone_HostConfig_To_v1beta1_HostConfig(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Hosts = nil - } - return nil -} - -// Convert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig is an autogenerated conversion function. -func Convert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig(in *kubeone.StaticWorkersConfig, out *StaticWorkersConfig, s conversion.Scope) error { - return autoConvert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig(in, out, s) -} - -func autoConvert_v1beta1_SystemPackages_To_kubeone_SystemPackages(in *SystemPackages, out *kubeone.SystemPackages, s conversion.Scope) error { - out.ConfigureRepositories = in.ConfigureRepositories - return nil -} - -// Convert_v1beta1_SystemPackages_To_kubeone_SystemPackages is an autogenerated conversion function. -func Convert_v1beta1_SystemPackages_To_kubeone_SystemPackages(in *SystemPackages, out *kubeone.SystemPackages, s conversion.Scope) error { - return autoConvert_v1beta1_SystemPackages_To_kubeone_SystemPackages(in, out, s) -} - -func autoConvert_kubeone_SystemPackages_To_v1beta1_SystemPackages(in *kubeone.SystemPackages, out *SystemPackages, s conversion.Scope) error { - out.ConfigureRepositories = in.ConfigureRepositories - return nil -} - -// Convert_kubeone_SystemPackages_To_v1beta1_SystemPackages is an autogenerated conversion function. -func Convert_kubeone_SystemPackages_To_v1beta1_SystemPackages(in *kubeone.SystemPackages, out *SystemPackages, s conversion.Scope) error { - return autoConvert_kubeone_SystemPackages_To_v1beta1_SystemPackages(in, out, s) -} - -func autoConvert_v1beta1_VersionConfig_To_kubeone_VersionConfig(in *VersionConfig, out *kubeone.VersionConfig, s conversion.Scope) error { - out.Kubernetes = in.Kubernetes - return nil -} - -// Convert_v1beta1_VersionConfig_To_kubeone_VersionConfig is an autogenerated conversion function. -func Convert_v1beta1_VersionConfig_To_kubeone_VersionConfig(in *VersionConfig, out *kubeone.VersionConfig, s conversion.Scope) error { - return autoConvert_v1beta1_VersionConfig_To_kubeone_VersionConfig(in, out, s) -} - -func autoConvert_kubeone_VersionConfig_To_v1beta1_VersionConfig(in *kubeone.VersionConfig, out *VersionConfig, s conversion.Scope) error { - out.Kubernetes = in.Kubernetes - return nil -} - -// Convert_kubeone_VersionConfig_To_v1beta1_VersionConfig is an autogenerated conversion function. -func Convert_kubeone_VersionConfig_To_v1beta1_VersionConfig(in *kubeone.VersionConfig, out *VersionConfig, s conversion.Scope) error { - return autoConvert_kubeone_VersionConfig_To_v1beta1_VersionConfig(in, out, s) -} - -func autoConvert_v1beta1_VsphereSpec_To_kubeone_VsphereSpec(in *VsphereSpec, out *kubeone.VsphereSpec, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_VsphereSpec_To_kubeone_VsphereSpec is an autogenerated conversion function. -func Convert_v1beta1_VsphereSpec_To_kubeone_VsphereSpec(in *VsphereSpec, out *kubeone.VsphereSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VsphereSpec_To_kubeone_VsphereSpec(in, out, s) -} - -func autoConvert_kubeone_VsphereSpec_To_v1beta1_VsphereSpec(in *kubeone.VsphereSpec, out *VsphereSpec, s conversion.Scope) error { - return nil -} - -// Convert_kubeone_VsphereSpec_To_v1beta1_VsphereSpec is an autogenerated conversion function. -func Convert_kubeone_VsphereSpec_To_v1beta1_VsphereSpec(in *kubeone.VsphereSpec, out *VsphereSpec, s conversion.Scope) error { - return autoConvert_kubeone_VsphereSpec_To_v1beta1_VsphereSpec(in, out, s) -} - -func autoConvert_v1beta1_WeaveNetSpec_To_kubeone_WeaveNetSpec(in *WeaveNetSpec, out *kubeone.WeaveNetSpec, s conversion.Scope) error { - out.Encrypted = in.Encrypted - return nil -} - -// Convert_v1beta1_WeaveNetSpec_To_kubeone_WeaveNetSpec is an autogenerated conversion function. -func Convert_v1beta1_WeaveNetSpec_To_kubeone_WeaveNetSpec(in *WeaveNetSpec, out *kubeone.WeaveNetSpec, s conversion.Scope) error { - return autoConvert_v1beta1_WeaveNetSpec_To_kubeone_WeaveNetSpec(in, out, s) -} - -func autoConvert_kubeone_WeaveNetSpec_To_v1beta1_WeaveNetSpec(in *kubeone.WeaveNetSpec, out *WeaveNetSpec, s conversion.Scope) error { - out.Encrypted = in.Encrypted - return nil -} - -// Convert_kubeone_WeaveNetSpec_To_v1beta1_WeaveNetSpec is an autogenerated conversion function. -func Convert_kubeone_WeaveNetSpec_To_v1beta1_WeaveNetSpec(in *kubeone.WeaveNetSpec, out *WeaveNetSpec, s conversion.Scope) error { - return autoConvert_kubeone_WeaveNetSpec_To_v1beta1_WeaveNetSpec(in, out, s) -} diff --git a/pkg/apis/kubeone/v1beta2/types.go b/pkg/apis/kubeone/v1beta2/types.go index 6a6091693..6456fabdd 100644 --- a/pkg/apis/kubeone/v1beta2/types.go +++ b/pkg/apis/kubeone/v1beta2/types.go @@ -180,6 +180,9 @@ type KubeletConfig struct { // EvictionHard configure --eviction-hard command-line flag of the kubelet. // See more at: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ EvictionHard map[string]string `json:"evictionHard,omitempty"` + // ContainerLogMaxSize configure --container-log-max-size command-line flag of the kubelet. Default value is 100Mi + // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ + ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } // APIEndpoint is the endpoint used to communicate with the Kubernetes API diff --git a/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go index cc7e03b6c..7469880a9 100644 --- a/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go @@ -1421,6 +1421,7 @@ func autoConvert_v1beta2_KubeletConfig_To_kubeone_KubeletConfig(in *KubeletConfi out.SystemReserved = *(*map[string]string)(unsafe.Pointer(&in.SystemReserved)) out.KubeReserved = *(*map[string]string)(unsafe.Pointer(&in.KubeReserved)) out.EvictionHard = *(*map[string]string)(unsafe.Pointer(&in.EvictionHard)) + out.ContainerLogMaxSize = in.ContainerLogMaxSize return nil } @@ -1433,6 +1434,7 @@ func autoConvert_kubeone_KubeletConfig_To_v1beta2_KubeletConfig(in *kubeone.Kube out.SystemReserved = *(*map[string]string)(unsafe.Pointer(&in.SystemReserved)) out.KubeReserved = *(*map[string]string)(unsafe.Pointer(&in.KubeReserved)) out.EvictionHard = *(*map[string]string)(unsafe.Pointer(&in.EvictionHard)) + out.ContainerLogMaxSize = in.ContainerLogMaxSize return nil } diff --git a/pkg/templates/kubeadm/v1beta2/kubeadm.go b/pkg/templates/kubeadm/v1beta2/kubeadm.go index b8f875cb9..d74653b72 100644 --- a/pkg/templates/kubeadm/v1beta2/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta2/kubeadm.go @@ -166,11 +166,10 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -358,11 +357,10 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -431,6 +429,12 @@ func newNodeRegistration(s *state.State, host kubeoneapi.HostConfig) kubeadmv1be kubeletCLIFlags["eviction-hard"] = kubeoneapi.MapStringStringToString(m, "<") } + if m := host.Kubelet.ContainerLogMaxSize; m != "" { + kubeletCLIFlags["container-log-max-size"] = m + } else { + kubeletCLIFlags["container-log-max-size"] = "100Mi" + } + return kubeadmv1beta2.NodeRegistrationOptions{ Name: host.Hostname, Taints: host.Taints, @@ -470,11 +474,3 @@ func kubeProxyConfiguration(s *state.State) *kubeproxyv1alpha1.KubeProxyConfigur return kubeProxyConfig } - -func getContainerLogMaxSize(value string) string { - if value == "" { - return "100Mi" - } - - return value -} diff --git a/pkg/templates/kubeadm/v1beta3/kubeadm.go b/pkg/templates/kubeadm/v1beta3/kubeadm.go index 32a201792..246c96f9e 100644 --- a/pkg/templates/kubeadm/v1beta3/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta3/kubeadm.go @@ -166,11 +166,10 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: getContainerLogsMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -358,11 +357,10 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: getContainerLogsMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -370,9 +368,6 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje }, FeatureGates: map[string]bool{}, } - if cluster.KubeletConfiguration.ContainerLogMaxSize == "" { - cluster.KubeletConfiguration.ContainerLogMaxSize = "100Mi" - } if cluster.AssetConfiguration.Pause.ImageRepository != "" { nodeRegistration.KubeletExtraArgs["pod-infra-container-image"] = cluster.AssetConfiguration.Pause.ImageRepository + "/pause:" + cluster.AssetConfiguration.Pause.ImageTag @@ -434,6 +429,12 @@ func newNodeRegistration(s *state.State, host kubeoneapi.HostConfig) kubeadmv1be kubeletCLIFlags["eviction-hard"] = kubeoneapi.MapStringStringToString(m, "<") } + if m := host.Kubelet.ContainerLogMaxSize; m != "" { + kubeletCLIFlags["container-log-max-size"] = m + } else { + kubeletCLIFlags["container-log-max-size"] = "100Mi" + } + return kubeadmv1beta3.NodeRegistrationOptions{ Name: host.Hostname, Taints: host.Taints, @@ -473,11 +474,3 @@ func kubeProxyConfiguration(s *state.State) *kubeproxyv1alpha1.KubeProxyConfigur return kubeProxyConfig } - -func getContainerLogsMaxSize(value string) string { - if value == "" { - return "100Mi" - } - - return value -} From c38aa827a9e489483af21ce06ac14ee2e7cc1705 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 5 Jan 2022 15:46:42 +0400 Subject: [PATCH 11/40] chore: remove flags for container log max size --- pkg/cmd/config.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index 2217f740a..10432324d 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -55,8 +55,7 @@ type printOpts struct { CloudProviderExternal bool CloudProviderCloudCfg string - ContainerLogMaxSize string `longflag:"container-log-max-size"` - ControlPlaneHosts string `longflag:"control-plane-hosts"` + ControlPlaneHosts string `longflag:"control-plane-hosts"` APIEndpointHost string `longflag:"api-endpoint-host"` APIEndpointPort int `longflag:"api-endpoint-port"` @@ -175,9 +174,6 @@ func configPrintCmd() *cobra.Command { // MachineController cmd.Flags().BoolVar(&opts.DeployMachineController, longFlagName(opts, "DeployMachineController"), true, "deploy kubermatic machine-controller") - // Kubelet Configuration - cmd.Flags().StringVar(&opts.ContainerLogMaxSize, longFlagName(opts, "ContainerLogMaxSize"), "100Mi", "Container Log Max Size") - return cmd } @@ -366,10 +362,6 @@ func createAndPrintManifest(printOptions *printOpts) error { cfg.Set(yamled.Path{"proxy", "noProxy"}, printOptions.NoProxy) } - // Kubelet Configuration - if printOptions.ContainerLogMaxSize == "" { - cfg.Set(yamled.Path{"kubeletConfiguration", "containerLogMaxSize"}, printOptions.ContainerLogMaxSize) - } // Features printFeatures(cfg, printOptions) From 604dd360a326b0b2048e85eb76e054673ac5caed Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 5 Jan 2022 15:52:30 +0400 Subject: [PATCH 12/40] chore: add conversion --- .../v1beta1/zz_generated.conversion.go | 1908 +++++++++++++++++ 1 file changed, 1908 insertions(+) create mode 100644 pkg/apis/kubeone/v1beta1/zz_generated.conversion.go diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go new file mode 100644 index 000000000..908e816bf --- /dev/null +++ b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go @@ -0,0 +1,1908 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KubeOne 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 v1beta1 + +import ( + json "encoding/json" + unsafe "unsafe" + + kubeone "k8c.io/kubeone/pkg/apis/kubeone" + v1 "k8s.io/api/core/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +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((*APIEndpoint)(nil), (*kubeone.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint(a.(*APIEndpoint), b.(*kubeone.APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint(a.(*kubeone.APIEndpoint), b.(*APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AWSSpec)(nil), (*kubeone.AWSSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AWSSpec_To_kubeone_AWSSpec(a.(*AWSSpec), b.(*kubeone.AWSSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.AWSSpec)(nil), (*AWSSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_AWSSpec_To_v1beta1_AWSSpec(a.(*kubeone.AWSSpec), b.(*AWSSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Addon)(nil), (*kubeone.Addon)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Addon_To_kubeone_Addon(a.(*Addon), b.(*kubeone.Addon), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.Addon)(nil), (*Addon)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_Addon_To_v1beta1_Addon(a.(*kubeone.Addon), b.(*Addon), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Addons)(nil), (*kubeone.Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Addons_To_kubeone_Addons(a.(*Addons), b.(*kubeone.Addons), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.Addons)(nil), (*Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_Addons_To_v1beta1_Addons(a.(*kubeone.Addons), b.(*Addons), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AssetConfiguration)(nil), (*kubeone.AssetConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration(a.(*AssetConfiguration), b.(*kubeone.AssetConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.AssetConfiguration)(nil), (*AssetConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration(a.(*kubeone.AssetConfiguration), b.(*AssetConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AzureSpec)(nil), (*kubeone.AzureSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AzureSpec_To_kubeone_AzureSpec(a.(*AzureSpec), b.(*kubeone.AzureSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.AzureSpec)(nil), (*AzureSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_AzureSpec_To_v1beta1_AzureSpec(a.(*kubeone.AzureSpec), b.(*AzureSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BinaryAsset)(nil), (*kubeone.BinaryAsset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(a.(*BinaryAsset), b.(*kubeone.BinaryAsset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.BinaryAsset)(nil), (*BinaryAsset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(a.(*kubeone.BinaryAsset), b.(*BinaryAsset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CNI)(nil), (*kubeone.CNI)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CNI_To_kubeone_CNI(a.(*CNI), b.(*kubeone.CNI), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.CNI)(nil), (*CNI)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_CNI_To_v1beta1_CNI(a.(*kubeone.CNI), b.(*CNI), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CanalSpec)(nil), (*kubeone.CanalSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CanalSpec_To_kubeone_CanalSpec(a.(*CanalSpec), b.(*kubeone.CanalSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.CanalSpec)(nil), (*CanalSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_CanalSpec_To_v1beta1_CanalSpec(a.(*kubeone.CanalSpec), b.(*CanalSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CiliumSpec)(nil), (*kubeone.CiliumSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CiliumSpec_To_kubeone_CiliumSpec(a.(*CiliumSpec), b.(*kubeone.CiliumSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.CiliumSpec)(nil), (*CiliumSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_CiliumSpec_To_v1beta1_CiliumSpec(a.(*kubeone.CiliumSpec), b.(*CiliumSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterNetworkConfig)(nil), (*kubeone.ClusterNetworkConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig(a.(*ClusterNetworkConfig), b.(*kubeone.ClusterNetworkConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.ClusterNetworkConfig)(nil), (*ClusterNetworkConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig(a.(*kubeone.ClusterNetworkConfig), b.(*ClusterNetworkConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ContainerRuntimeConfig)(nil), (*kubeone.ContainerRuntimeConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig(a.(*ContainerRuntimeConfig), b.(*kubeone.ContainerRuntimeConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.ContainerRuntimeConfig)(nil), (*ContainerRuntimeConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig(a.(*kubeone.ContainerRuntimeConfig), b.(*ContainerRuntimeConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ContainerRuntimeContainerd)(nil), (*kubeone.ContainerRuntimeContainerd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd(a.(*ContainerRuntimeContainerd), b.(*kubeone.ContainerRuntimeContainerd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ContainerRuntimeDocker)(nil), (*kubeone.ContainerRuntimeDocker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker(a.(*ContainerRuntimeDocker), b.(*kubeone.ContainerRuntimeDocker), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControlPlaneConfig)(nil), (*kubeone.ControlPlaneConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig(a.(*ControlPlaneConfig), b.(*kubeone.ControlPlaneConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.ControlPlaneConfig)(nil), (*ControlPlaneConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig(a.(*kubeone.ControlPlaneConfig), b.(*ControlPlaneConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DNSConfig)(nil), (*kubeone.DNSConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DNSConfig_To_kubeone_DNSConfig(a.(*DNSConfig), b.(*kubeone.DNSConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.DNSConfig)(nil), (*DNSConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_DNSConfig_To_v1beta1_DNSConfig(a.(*kubeone.DNSConfig), b.(*DNSConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DigitalOceanSpec)(nil), (*kubeone.DigitalOceanSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DigitalOceanSpec_To_kubeone_DigitalOceanSpec(a.(*DigitalOceanSpec), b.(*kubeone.DigitalOceanSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.DigitalOceanSpec)(nil), (*DigitalOceanSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_DigitalOceanSpec_To_v1beta1_DigitalOceanSpec(a.(*kubeone.DigitalOceanSpec), b.(*DigitalOceanSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DynamicAuditLog)(nil), (*kubeone.DynamicAuditLog)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DynamicAuditLog_To_kubeone_DynamicAuditLog(a.(*DynamicAuditLog), b.(*kubeone.DynamicAuditLog), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.DynamicAuditLog)(nil), (*DynamicAuditLog)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_DynamicAuditLog_To_v1beta1_DynamicAuditLog(a.(*kubeone.DynamicAuditLog), b.(*DynamicAuditLog), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DynamicWorkerConfig)(nil), (*kubeone.DynamicWorkerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DynamicWorkerConfig_To_kubeone_DynamicWorkerConfig(a.(*DynamicWorkerConfig), b.(*kubeone.DynamicWorkerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.DynamicWorkerConfig)(nil), (*DynamicWorkerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_DynamicWorkerConfig_To_v1beta1_DynamicWorkerConfig(a.(*kubeone.DynamicWorkerConfig), b.(*DynamicWorkerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*EncryptionProviders)(nil), (*kubeone.EncryptionProviders)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_EncryptionProviders_To_kubeone_EncryptionProviders(a.(*EncryptionProviders), b.(*kubeone.EncryptionProviders), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.EncryptionProviders)(nil), (*EncryptionProviders)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_EncryptionProviders_To_v1beta1_EncryptionProviders(a.(*kubeone.EncryptionProviders), b.(*EncryptionProviders), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExternalCNISpec)(nil), (*kubeone.ExternalCNISpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExternalCNISpec_To_kubeone_ExternalCNISpec(a.(*ExternalCNISpec), b.(*kubeone.ExternalCNISpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.ExternalCNISpec)(nil), (*ExternalCNISpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_ExternalCNISpec_To_v1beta1_ExternalCNISpec(a.(*kubeone.ExternalCNISpec), b.(*ExternalCNISpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.Features)(nil), (*Features)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_Features_To_v1beta1_Features(a.(*kubeone.Features), b.(*Features), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GCESpec)(nil), (*kubeone.GCESpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_GCESpec_To_kubeone_GCESpec(a.(*GCESpec), b.(*kubeone.GCESpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.GCESpec)(nil), (*GCESpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_GCESpec_To_v1beta1_GCESpec(a.(*kubeone.GCESpec), b.(*GCESpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HetznerSpec)(nil), (*kubeone.HetznerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HetznerSpec_To_kubeone_HetznerSpec(a.(*HetznerSpec), b.(*kubeone.HetznerSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.HetznerSpec)(nil), (*HetznerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_HetznerSpec_To_v1beta1_HetznerSpec(a.(*kubeone.HetznerSpec), b.(*HetznerSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HostConfig)(nil), (*kubeone.HostConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HostConfig_To_kubeone_HostConfig(a.(*HostConfig), b.(*kubeone.HostConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*IPTables)(nil), (*kubeone.IPTables)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_IPTables_To_kubeone_IPTables(a.(*IPTables), b.(*kubeone.IPTables), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.IPTables)(nil), (*IPTables)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_IPTables_To_v1beta1_IPTables(a.(*kubeone.IPTables), b.(*IPTables), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*IPVSConfig)(nil), (*kubeone.IPVSConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_IPVSConfig_To_kubeone_IPVSConfig(a.(*IPVSConfig), b.(*kubeone.IPVSConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.IPVSConfig)(nil), (*IPVSConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_IPVSConfig_To_v1beta1_IPVSConfig(a.(*kubeone.IPVSConfig), b.(*IPVSConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ImageAsset)(nil), (*kubeone.ImageAsset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(a.(*ImageAsset), b.(*kubeone.ImageAsset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.ImageAsset)(nil), (*ImageAsset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(a.(*kubeone.ImageAsset), b.(*ImageAsset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeOneCluster)(nil), (*kubeone.KubeOneCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(a.(*KubeOneCluster), b.(*kubeone.KubeOneCluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.KubeOneCluster)(nil), (*KubeOneCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(a.(*kubeone.KubeOneCluster), b.(*KubeOneCluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeProxyConfig)(nil), (*kubeone.KubeProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig(a.(*KubeProxyConfig), b.(*kubeone.KubeProxyConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.KubeProxyConfig)(nil), (*KubeProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(a.(*kubeone.KubeProxyConfig), b.(*KubeProxyConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineControllerConfig)(nil), (*kubeone.MachineControllerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(a.(*MachineControllerConfig), b.(*kubeone.MachineControllerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.MachineControllerConfig)(nil), (*MachineControllerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_MachineControllerConfig_To_v1beta1_MachineControllerConfig(a.(*kubeone.MachineControllerConfig), b.(*MachineControllerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MetricsServer)(nil), (*kubeone.MetricsServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MetricsServer_To_kubeone_MetricsServer(a.(*MetricsServer), b.(*kubeone.MetricsServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.MetricsServer)(nil), (*MetricsServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_MetricsServer_To_v1beta1_MetricsServer(a.(*kubeone.MetricsServer), b.(*MetricsServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NoneSpec)(nil), (*kubeone.NoneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NoneSpec_To_kubeone_NoneSpec(a.(*NoneSpec), b.(*kubeone.NoneSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.NoneSpec)(nil), (*NoneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_NoneSpec_To_v1beta1_NoneSpec(a.(*kubeone.NoneSpec), b.(*NoneSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenIDConnect)(nil), (*kubeone.OpenIDConnect)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenIDConnect_To_kubeone_OpenIDConnect(a.(*OpenIDConnect), b.(*kubeone.OpenIDConnect), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.OpenIDConnect)(nil), (*OpenIDConnect)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_OpenIDConnect_To_v1beta1_OpenIDConnect(a.(*kubeone.OpenIDConnect), b.(*OpenIDConnect), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenIDConnectConfig)(nil), (*kubeone.OpenIDConnectConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(a.(*OpenIDConnectConfig), b.(*kubeone.OpenIDConnectConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.OpenIDConnectConfig)(nil), (*OpenIDConnectConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig(a.(*kubeone.OpenIDConnectConfig), b.(*OpenIDConnectConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenstackSpec)(nil), (*kubeone.OpenstackSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenstackSpec_To_kubeone_OpenstackSpec(a.(*OpenstackSpec), b.(*kubeone.OpenstackSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.OpenstackSpec)(nil), (*OpenstackSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_OpenstackSpec_To_v1beta1_OpenstackSpec(a.(*kubeone.OpenstackSpec), b.(*OpenstackSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PodNodeSelector)(nil), (*kubeone.PodNodeSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PodNodeSelector_To_kubeone_PodNodeSelector(a.(*PodNodeSelector), b.(*kubeone.PodNodeSelector), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.PodNodeSelector)(nil), (*PodNodeSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_PodNodeSelector_To_v1beta1_PodNodeSelector(a.(*kubeone.PodNodeSelector), b.(*PodNodeSelector), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PodNodeSelectorConfig)(nil), (*kubeone.PodNodeSelectorConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig(a.(*PodNodeSelectorConfig), b.(*kubeone.PodNodeSelectorConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.PodNodeSelectorConfig)(nil), (*PodNodeSelectorConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig(a.(*kubeone.PodNodeSelectorConfig), b.(*PodNodeSelectorConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PodSecurityPolicy)(nil), (*kubeone.PodSecurityPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PodSecurityPolicy_To_kubeone_PodSecurityPolicy(a.(*PodSecurityPolicy), b.(*kubeone.PodSecurityPolicy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.PodSecurityPolicy)(nil), (*PodSecurityPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(a.(*kubeone.PodSecurityPolicy), b.(*PodSecurityPolicy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProviderSpec)(nil), (*kubeone.ProviderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec(a.(*ProviderSpec), b.(*kubeone.ProviderSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.ProviderSpec)(nil), (*ProviderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec(a.(*kubeone.ProviderSpec), b.(*ProviderSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProviderStaticNetworkConfig)(nil), (*kubeone.ProviderStaticNetworkConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProviderStaticNetworkConfig_To_kubeone_ProviderStaticNetworkConfig(a.(*ProviderStaticNetworkConfig), b.(*kubeone.ProviderStaticNetworkConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.ProviderStaticNetworkConfig)(nil), (*ProviderStaticNetworkConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_ProviderStaticNetworkConfig_To_v1beta1_ProviderStaticNetworkConfig(a.(*kubeone.ProviderStaticNetworkConfig), b.(*ProviderStaticNetworkConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProxyConfig)(nil), (*kubeone.ProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig(a.(*ProxyConfig), b.(*kubeone.ProxyConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.ProxyConfig)(nil), (*ProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig(a.(*kubeone.ProxyConfig), b.(*ProxyConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RegistryConfiguration)(nil), (*kubeone.RegistryConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_RegistryConfiguration_To_kubeone_RegistryConfiguration(a.(*RegistryConfiguration), b.(*kubeone.RegistryConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.RegistryConfiguration)(nil), (*RegistryConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_RegistryConfiguration_To_v1beta1_RegistryConfiguration(a.(*kubeone.RegistryConfiguration), b.(*RegistryConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*StaticAuditLog)(nil), (*kubeone.StaticAuditLog)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_StaticAuditLog_To_kubeone_StaticAuditLog(a.(*StaticAuditLog), b.(*kubeone.StaticAuditLog), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.StaticAuditLog)(nil), (*StaticAuditLog)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_StaticAuditLog_To_v1beta1_StaticAuditLog(a.(*kubeone.StaticAuditLog), b.(*StaticAuditLog), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*StaticAuditLogConfig)(nil), (*kubeone.StaticAuditLogConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig(a.(*StaticAuditLogConfig), b.(*kubeone.StaticAuditLogConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.StaticAuditLogConfig)(nil), (*StaticAuditLogConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig(a.(*kubeone.StaticAuditLogConfig), b.(*StaticAuditLogConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*StaticWorkersConfig)(nil), (*kubeone.StaticWorkersConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig(a.(*StaticWorkersConfig), b.(*kubeone.StaticWorkersConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.StaticWorkersConfig)(nil), (*StaticWorkersConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig(a.(*kubeone.StaticWorkersConfig), b.(*StaticWorkersConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SystemPackages)(nil), (*kubeone.SystemPackages)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SystemPackages_To_kubeone_SystemPackages(a.(*SystemPackages), b.(*kubeone.SystemPackages), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.SystemPackages)(nil), (*SystemPackages)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_SystemPackages_To_v1beta1_SystemPackages(a.(*kubeone.SystemPackages), b.(*SystemPackages), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VersionConfig)(nil), (*kubeone.VersionConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_VersionConfig_To_kubeone_VersionConfig(a.(*VersionConfig), b.(*kubeone.VersionConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.VersionConfig)(nil), (*VersionConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_VersionConfig_To_v1beta1_VersionConfig(a.(*kubeone.VersionConfig), b.(*VersionConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VsphereSpec)(nil), (*kubeone.VsphereSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_VsphereSpec_To_kubeone_VsphereSpec(a.(*VsphereSpec), b.(*kubeone.VsphereSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.VsphereSpec)(nil), (*VsphereSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_VsphereSpec_To_v1beta1_VsphereSpec(a.(*kubeone.VsphereSpec), b.(*VsphereSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*WeaveNetSpec)(nil), (*kubeone.WeaveNetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_WeaveNetSpec_To_kubeone_WeaveNetSpec(a.(*WeaveNetSpec), b.(*kubeone.WeaveNetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.WeaveNetSpec)(nil), (*WeaveNetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_WeaveNetSpec_To_v1beta1_WeaveNetSpec(a.(*kubeone.WeaveNetSpec), b.(*WeaveNetSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*kubeone.CloudProviderSpec)(nil), (*CloudProviderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_CloudProviderSpec_To_v1beta1_CloudProviderSpec(a.(*kubeone.CloudProviderSpec), b.(*CloudProviderSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*kubeone.ContainerRuntimeContainerd)(nil), (*ContainerRuntimeContainerd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_ContainerRuntimeContainerd_To_v1beta1_ContainerRuntimeContainerd(a.(*kubeone.ContainerRuntimeContainerd), b.(*ContainerRuntimeContainerd), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*kubeone.ContainerRuntimeDocker)(nil), (*ContainerRuntimeDocker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_ContainerRuntimeDocker_To_v1beta1_ContainerRuntimeDocker(a.(*kubeone.ContainerRuntimeDocker), b.(*ContainerRuntimeDocker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*kubeone.HostConfig)(nil), (*HostConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_HostConfig_To_v1beta1_HostConfig(a.(*kubeone.HostConfig), b.(*HostConfig), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*CloudProviderSpec)(nil), (*kubeone.CloudProviderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudProviderSpec_To_kubeone_CloudProviderSpec(a.(*CloudProviderSpec), b.(*kubeone.CloudProviderSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Features)(nil), (*kubeone.Features)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Features_To_kubeone_Features(a.(*Features), b.(*kubeone.Features), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint(in *APIEndpoint, out *kubeone.APIEndpoint, s conversion.Scope) error { + out.Host = in.Host + out.Port = in.Port + out.AlternativeNames = *(*[]string)(unsafe.Pointer(&in.AlternativeNames)) + return nil +} + +// Convert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint is an autogenerated conversion function. +func Convert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint(in *APIEndpoint, out *kubeone.APIEndpoint, s conversion.Scope) error { + return autoConvert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint(in, out, s) +} + +func autoConvert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint(in *kubeone.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + out.Host = in.Host + out.Port = in.Port + out.AlternativeNames = *(*[]string)(unsafe.Pointer(&in.AlternativeNames)) + return nil +} + +// Convert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. +func Convert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint(in *kubeone.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + return autoConvert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) +} + +func autoConvert_v1beta1_AWSSpec_To_kubeone_AWSSpec(in *AWSSpec, out *kubeone.AWSSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_AWSSpec_To_kubeone_AWSSpec is an autogenerated conversion function. +func Convert_v1beta1_AWSSpec_To_kubeone_AWSSpec(in *AWSSpec, out *kubeone.AWSSpec, s conversion.Scope) error { + return autoConvert_v1beta1_AWSSpec_To_kubeone_AWSSpec(in, out, s) +} + +func autoConvert_kubeone_AWSSpec_To_v1beta1_AWSSpec(in *kubeone.AWSSpec, out *AWSSpec, s conversion.Scope) error { + return nil +} + +// Convert_kubeone_AWSSpec_To_v1beta1_AWSSpec is an autogenerated conversion function. +func Convert_kubeone_AWSSpec_To_v1beta1_AWSSpec(in *kubeone.AWSSpec, out *AWSSpec, s conversion.Scope) error { + return autoConvert_kubeone_AWSSpec_To_v1beta1_AWSSpec(in, out, s) +} + +func autoConvert_v1beta1_Addon_To_kubeone_Addon(in *Addon, out *kubeone.Addon, s conversion.Scope) error { + out.Name = in.Name + out.Params = *(*map[string]string)(unsafe.Pointer(&in.Params)) + out.Delete = in.Delete + return nil +} + +// Convert_v1beta1_Addon_To_kubeone_Addon is an autogenerated conversion function. +func Convert_v1beta1_Addon_To_kubeone_Addon(in *Addon, out *kubeone.Addon, s conversion.Scope) error { + return autoConvert_v1beta1_Addon_To_kubeone_Addon(in, out, s) +} + +func autoConvert_kubeone_Addon_To_v1beta1_Addon(in *kubeone.Addon, out *Addon, s conversion.Scope) error { + out.Name = in.Name + out.Params = *(*map[string]string)(unsafe.Pointer(&in.Params)) + out.Delete = in.Delete + return nil +} + +// Convert_kubeone_Addon_To_v1beta1_Addon is an autogenerated conversion function. +func Convert_kubeone_Addon_To_v1beta1_Addon(in *kubeone.Addon, out *Addon, s conversion.Scope) error { + return autoConvert_kubeone_Addon_To_v1beta1_Addon(in, out, s) +} + +func autoConvert_v1beta1_Addons_To_kubeone_Addons(in *Addons, out *kubeone.Addons, s conversion.Scope) error { + out.Enable = in.Enable + out.Path = in.Path + out.GlobalParams = *(*map[string]string)(unsafe.Pointer(&in.GlobalParams)) + out.Addons = *(*[]kubeone.Addon)(unsafe.Pointer(&in.Addons)) + return nil +} + +// Convert_v1beta1_Addons_To_kubeone_Addons is an autogenerated conversion function. +func Convert_v1beta1_Addons_To_kubeone_Addons(in *Addons, out *kubeone.Addons, s conversion.Scope) error { + return autoConvert_v1beta1_Addons_To_kubeone_Addons(in, out, s) +} + +func autoConvert_kubeone_Addons_To_v1beta1_Addons(in *kubeone.Addons, out *Addons, s conversion.Scope) error { + out.Enable = in.Enable + out.Path = in.Path + out.GlobalParams = *(*map[string]string)(unsafe.Pointer(&in.GlobalParams)) + out.Addons = *(*[]Addon)(unsafe.Pointer(&in.Addons)) + return nil +} + +// Convert_kubeone_Addons_To_v1beta1_Addons is an autogenerated conversion function. +func Convert_kubeone_Addons_To_v1beta1_Addons(in *kubeone.Addons, out *Addons, s conversion.Scope) error { + return autoConvert_kubeone_Addons_To_v1beta1_Addons(in, out, s) +} + +func autoConvert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration(in *AssetConfiguration, out *kubeone.AssetConfiguration, s conversion.Scope) error { + if err := Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if err := Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(&in.Pause, &out.Pause, s); err != nil { + return err + } + if err := Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(&in.CoreDNS, &out.CoreDNS, s); err != nil { + return err + } + if err := Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(&in.Etcd, &out.Etcd, s); err != nil { + return err + } + if err := Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(&in.MetricsServer, &out.MetricsServer, s); err != nil { + return err + } + if err := Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(&in.CNI, &out.CNI, s); err != nil { + return err + } + if err := Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(&in.NodeBinaries, &out.NodeBinaries, s); err != nil { + return err + } + if err := Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(&in.Kubectl, &out.Kubectl, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration is an autogenerated conversion function. +func Convert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration(in *AssetConfiguration, out *kubeone.AssetConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration(in, out, s) +} + +func autoConvert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration(in *kubeone.AssetConfiguration, out *AssetConfiguration, s conversion.Scope) error { + if err := Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if err := Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(&in.Pause, &out.Pause, s); err != nil { + return err + } + if err := Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(&in.CoreDNS, &out.CoreDNS, s); err != nil { + return err + } + if err := Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(&in.Etcd, &out.Etcd, s); err != nil { + return err + } + if err := Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(&in.MetricsServer, &out.MetricsServer, s); err != nil { + return err + } + if err := Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(&in.CNI, &out.CNI, s); err != nil { + return err + } + if err := Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(&in.NodeBinaries, &out.NodeBinaries, s); err != nil { + return err + } + if err := Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(&in.Kubectl, &out.Kubectl, s); err != nil { + return err + } + return nil +} + +// Convert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration is an autogenerated conversion function. +func Convert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration(in *kubeone.AssetConfiguration, out *AssetConfiguration, s conversion.Scope) error { + return autoConvert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration(in, out, s) +} + +func autoConvert_v1beta1_AzureSpec_To_kubeone_AzureSpec(in *AzureSpec, out *kubeone.AzureSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_AzureSpec_To_kubeone_AzureSpec is an autogenerated conversion function. +func Convert_v1beta1_AzureSpec_To_kubeone_AzureSpec(in *AzureSpec, out *kubeone.AzureSpec, s conversion.Scope) error { + return autoConvert_v1beta1_AzureSpec_To_kubeone_AzureSpec(in, out, s) +} + +func autoConvert_kubeone_AzureSpec_To_v1beta1_AzureSpec(in *kubeone.AzureSpec, out *AzureSpec, s conversion.Scope) error { + return nil +} + +// Convert_kubeone_AzureSpec_To_v1beta1_AzureSpec is an autogenerated conversion function. +func Convert_kubeone_AzureSpec_To_v1beta1_AzureSpec(in *kubeone.AzureSpec, out *AzureSpec, s conversion.Scope) error { + return autoConvert_kubeone_AzureSpec_To_v1beta1_AzureSpec(in, out, s) +} + +func autoConvert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(in *BinaryAsset, out *kubeone.BinaryAsset, s conversion.Scope) error { + out.URL = in.URL + return nil +} + +// Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset is an autogenerated conversion function. +func Convert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(in *BinaryAsset, out *kubeone.BinaryAsset, s conversion.Scope) error { + return autoConvert_v1beta1_BinaryAsset_To_kubeone_BinaryAsset(in, out, s) +} + +func autoConvert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(in *kubeone.BinaryAsset, out *BinaryAsset, s conversion.Scope) error { + out.URL = in.URL + return nil +} + +// Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset is an autogenerated conversion function. +func Convert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(in *kubeone.BinaryAsset, out *BinaryAsset, s conversion.Scope) error { + return autoConvert_kubeone_BinaryAsset_To_v1beta1_BinaryAsset(in, out, s) +} + +func autoConvert_v1beta1_CNI_To_kubeone_CNI(in *CNI, out *kubeone.CNI, s conversion.Scope) error { + out.Canal = (*kubeone.CanalSpec)(unsafe.Pointer(in.Canal)) + out.Cilium = (*kubeone.CiliumSpec)(unsafe.Pointer(in.Cilium)) + out.WeaveNet = (*kubeone.WeaveNetSpec)(unsafe.Pointer(in.WeaveNet)) + out.External = (*kubeone.ExternalCNISpec)(unsafe.Pointer(in.External)) + return nil +} + +// Convert_v1beta1_CNI_To_kubeone_CNI is an autogenerated conversion function. +func Convert_v1beta1_CNI_To_kubeone_CNI(in *CNI, out *kubeone.CNI, s conversion.Scope) error { + return autoConvert_v1beta1_CNI_To_kubeone_CNI(in, out, s) +} + +func autoConvert_kubeone_CNI_To_v1beta1_CNI(in *kubeone.CNI, out *CNI, s conversion.Scope) error { + out.Canal = (*CanalSpec)(unsafe.Pointer(in.Canal)) + out.Cilium = (*CiliumSpec)(unsafe.Pointer(in.Cilium)) + out.WeaveNet = (*WeaveNetSpec)(unsafe.Pointer(in.WeaveNet)) + out.External = (*ExternalCNISpec)(unsafe.Pointer(in.External)) + return nil +} + +// Convert_kubeone_CNI_To_v1beta1_CNI is an autogenerated conversion function. +func Convert_kubeone_CNI_To_v1beta1_CNI(in *kubeone.CNI, out *CNI, s conversion.Scope) error { + return autoConvert_kubeone_CNI_To_v1beta1_CNI(in, out, s) +} + +func autoConvert_v1beta1_CanalSpec_To_kubeone_CanalSpec(in *CanalSpec, out *kubeone.CanalSpec, s conversion.Scope) error { + out.MTU = in.MTU + return nil +} + +// Convert_v1beta1_CanalSpec_To_kubeone_CanalSpec is an autogenerated conversion function. +func Convert_v1beta1_CanalSpec_To_kubeone_CanalSpec(in *CanalSpec, out *kubeone.CanalSpec, s conversion.Scope) error { + return autoConvert_v1beta1_CanalSpec_To_kubeone_CanalSpec(in, out, s) +} + +func autoConvert_kubeone_CanalSpec_To_v1beta1_CanalSpec(in *kubeone.CanalSpec, out *CanalSpec, s conversion.Scope) error { + out.MTU = in.MTU + return nil +} + +// Convert_kubeone_CanalSpec_To_v1beta1_CanalSpec is an autogenerated conversion function. +func Convert_kubeone_CanalSpec_To_v1beta1_CanalSpec(in *kubeone.CanalSpec, out *CanalSpec, s conversion.Scope) error { + return autoConvert_kubeone_CanalSpec_To_v1beta1_CanalSpec(in, out, s) +} + +func autoConvert_v1beta1_CiliumSpec_To_kubeone_CiliumSpec(in *CiliumSpec, out *kubeone.CiliumSpec, s conversion.Scope) error { + out.KubeProxyReplacement = kubeone.KubeProxyReplacementType(in.KubeProxyReplacement) + out.EnableHubble = in.EnableHubble + return nil +} + +// Convert_v1beta1_CiliumSpec_To_kubeone_CiliumSpec is an autogenerated conversion function. +func Convert_v1beta1_CiliumSpec_To_kubeone_CiliumSpec(in *CiliumSpec, out *kubeone.CiliumSpec, s conversion.Scope) error { + return autoConvert_v1beta1_CiliumSpec_To_kubeone_CiliumSpec(in, out, s) +} + +func autoConvert_kubeone_CiliumSpec_To_v1beta1_CiliumSpec(in *kubeone.CiliumSpec, out *CiliumSpec, s conversion.Scope) error { + out.KubeProxyReplacement = KubeProxyReplacementType(in.KubeProxyReplacement) + out.EnableHubble = in.EnableHubble + return nil +} + +// Convert_kubeone_CiliumSpec_To_v1beta1_CiliumSpec is an autogenerated conversion function. +func Convert_kubeone_CiliumSpec_To_v1beta1_CiliumSpec(in *kubeone.CiliumSpec, out *CiliumSpec, s conversion.Scope) error { + return autoConvert_kubeone_CiliumSpec_To_v1beta1_CiliumSpec(in, out, s) +} + +func autoConvert_v1beta1_CloudProviderSpec_To_kubeone_CloudProviderSpec(in *CloudProviderSpec, out *kubeone.CloudProviderSpec, s conversion.Scope) error { + out.External = in.External + out.CloudConfig = in.CloudConfig + out.CSIConfig = in.CSIConfig + out.AWS = (*kubeone.AWSSpec)(unsafe.Pointer(in.AWS)) + out.Azure = (*kubeone.AzureSpec)(unsafe.Pointer(in.Azure)) + out.DigitalOcean = (*kubeone.DigitalOceanSpec)(unsafe.Pointer(in.DigitalOcean)) + out.GCE = (*kubeone.GCESpec)(unsafe.Pointer(in.GCE)) + out.Hetzner = (*kubeone.HetznerSpec)(unsafe.Pointer(in.Hetzner)) + out.Openstack = (*kubeone.OpenstackSpec)(unsafe.Pointer(in.Openstack)) + // WARNING: in.Packet requires manual conversion: does not exist in peer-type + out.Vsphere = (*kubeone.VsphereSpec)(unsafe.Pointer(in.Vsphere)) + out.None = (*kubeone.NoneSpec)(unsafe.Pointer(in.None)) + return nil +} + +func autoConvert_kubeone_CloudProviderSpec_To_v1beta1_CloudProviderSpec(in *kubeone.CloudProviderSpec, out *CloudProviderSpec, s conversion.Scope) error { + out.External = in.External + out.CloudConfig = in.CloudConfig + out.CSIConfig = in.CSIConfig + out.AWS = (*AWSSpec)(unsafe.Pointer(in.AWS)) + out.Azure = (*AzureSpec)(unsafe.Pointer(in.Azure)) + out.DigitalOcean = (*DigitalOceanSpec)(unsafe.Pointer(in.DigitalOcean)) + out.GCE = (*GCESpec)(unsafe.Pointer(in.GCE)) + out.Hetzner = (*HetznerSpec)(unsafe.Pointer(in.Hetzner)) + out.Openstack = (*OpenstackSpec)(unsafe.Pointer(in.Openstack)) + // WARNING: in.EquinixMetal requires manual conversion: does not exist in peer-type + out.Vsphere = (*VsphereSpec)(unsafe.Pointer(in.Vsphere)) + out.None = (*NoneSpec)(unsafe.Pointer(in.None)) + return nil +} + +func autoConvert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig(in *ClusterNetworkConfig, out *kubeone.ClusterNetworkConfig, s conversion.Scope) error { + out.PodSubnet = in.PodSubnet + out.ServiceSubnet = in.ServiceSubnet + out.ServiceDomainName = in.ServiceDomainName + out.NodePortRange = in.NodePortRange + out.CNI = (*kubeone.CNI)(unsafe.Pointer(in.CNI)) + out.KubeProxy = (*kubeone.KubeProxyConfig)(unsafe.Pointer(in.KubeProxy)) + return nil +} + +// Convert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig is an autogenerated conversion function. +func Convert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig(in *ClusterNetworkConfig, out *kubeone.ClusterNetworkConfig, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig(in, out, s) +} + +func autoConvert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig(in *kubeone.ClusterNetworkConfig, out *ClusterNetworkConfig, s conversion.Scope) error { + out.PodSubnet = in.PodSubnet + out.ServiceSubnet = in.ServiceSubnet + out.ServiceDomainName = in.ServiceDomainName + out.NodePortRange = in.NodePortRange + out.CNI = (*CNI)(unsafe.Pointer(in.CNI)) + out.KubeProxy = (*KubeProxyConfig)(unsafe.Pointer(in.KubeProxy)) + return nil +} + +// Convert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig is an autogenerated conversion function. +func Convert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig(in *kubeone.ClusterNetworkConfig, out *ClusterNetworkConfig, s conversion.Scope) error { + return autoConvert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig(in, out, s) +} + +func autoConvert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig(in *ContainerRuntimeConfig, out *kubeone.ContainerRuntimeConfig, s conversion.Scope) error { + if in.Docker != nil { + in, out := &in.Docker, &out.Docker + *out = new(kubeone.ContainerRuntimeDocker) + if err := Convert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker(*in, *out, s); err != nil { + return err + } + } else { + out.Docker = nil + } + if in.Containerd != nil { + in, out := &in.Containerd, &out.Containerd + *out = new(kubeone.ContainerRuntimeContainerd) + if err := Convert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd(*in, *out, s); err != nil { + return err + } + } else { + out.Containerd = nil + } + return nil +} + +// Convert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig is an autogenerated conversion function. +func Convert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig(in *ContainerRuntimeConfig, out *kubeone.ContainerRuntimeConfig, s conversion.Scope) error { + return autoConvert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig(in, out, s) +} + +func autoConvert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig(in *kubeone.ContainerRuntimeConfig, out *ContainerRuntimeConfig, s conversion.Scope) error { + if in.Docker != nil { + in, out := &in.Docker, &out.Docker + *out = new(ContainerRuntimeDocker) + if err := Convert_kubeone_ContainerRuntimeDocker_To_v1beta1_ContainerRuntimeDocker(*in, *out, s); err != nil { + return err + } + } else { + out.Docker = nil + } + if in.Containerd != nil { + in, out := &in.Containerd, &out.Containerd + *out = new(ContainerRuntimeContainerd) + if err := Convert_kubeone_ContainerRuntimeContainerd_To_v1beta1_ContainerRuntimeContainerd(*in, *out, s); err != nil { + return err + } + } else { + out.Containerd = nil + } + return nil +} + +// Convert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig is an autogenerated conversion function. +func Convert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig(in *kubeone.ContainerRuntimeConfig, out *ContainerRuntimeConfig, s conversion.Scope) error { + return autoConvert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig(in, out, s) +} + +func autoConvert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd(in *ContainerRuntimeContainerd, out *kubeone.ContainerRuntimeContainerd, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd is an autogenerated conversion function. +func Convert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd(in *ContainerRuntimeContainerd, out *kubeone.ContainerRuntimeContainerd, s conversion.Scope) error { + return autoConvert_v1beta1_ContainerRuntimeContainerd_To_kubeone_ContainerRuntimeContainerd(in, out, s) +} + +func autoConvert_kubeone_ContainerRuntimeContainerd_To_v1beta1_ContainerRuntimeContainerd(in *kubeone.ContainerRuntimeContainerd, out *ContainerRuntimeContainerd, s conversion.Scope) error { + // WARNING: in.Registries requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker(in *ContainerRuntimeDocker, out *kubeone.ContainerRuntimeDocker, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker is an autogenerated conversion function. +func Convert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker(in *ContainerRuntimeDocker, out *kubeone.ContainerRuntimeDocker, s conversion.Scope) error { + return autoConvert_v1beta1_ContainerRuntimeDocker_To_kubeone_ContainerRuntimeDocker(in, out, s) +} + +func autoConvert_kubeone_ContainerRuntimeDocker_To_v1beta1_ContainerRuntimeDocker(in *kubeone.ContainerRuntimeDocker, out *ContainerRuntimeDocker, s conversion.Scope) error { + // WARNING: in.RegistryMirrors requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig(in *ControlPlaneConfig, out *kubeone.ControlPlaneConfig, s conversion.Scope) error { + if in.Hosts != nil { + in, out := &in.Hosts, &out.Hosts + *out = make([]kubeone.HostConfig, len(*in)) + for i := range *in { + if err := Convert_v1beta1_HostConfig_To_kubeone_HostConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Hosts = nil + } + return nil +} + +// Convert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig is an autogenerated conversion function. +func Convert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig(in *ControlPlaneConfig, out *kubeone.ControlPlaneConfig, s conversion.Scope) error { + return autoConvert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig(in, out, s) +} + +func autoConvert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig(in *kubeone.ControlPlaneConfig, out *ControlPlaneConfig, s conversion.Scope) error { + if in.Hosts != nil { + in, out := &in.Hosts, &out.Hosts + *out = make([]HostConfig, len(*in)) + for i := range *in { + if err := Convert_kubeone_HostConfig_To_v1beta1_HostConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Hosts = nil + } + return nil +} + +// Convert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig is an autogenerated conversion function. +func Convert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig(in *kubeone.ControlPlaneConfig, out *ControlPlaneConfig, s conversion.Scope) error { + return autoConvert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig(in, out, s) +} + +func autoConvert_v1beta1_DNSConfig_To_kubeone_DNSConfig(in *DNSConfig, out *kubeone.DNSConfig, s conversion.Scope) error { + out.Servers = *(*[]string)(unsafe.Pointer(&in.Servers)) + return nil +} + +// Convert_v1beta1_DNSConfig_To_kubeone_DNSConfig is an autogenerated conversion function. +func Convert_v1beta1_DNSConfig_To_kubeone_DNSConfig(in *DNSConfig, out *kubeone.DNSConfig, s conversion.Scope) error { + return autoConvert_v1beta1_DNSConfig_To_kubeone_DNSConfig(in, out, s) +} + +func autoConvert_kubeone_DNSConfig_To_v1beta1_DNSConfig(in *kubeone.DNSConfig, out *DNSConfig, s conversion.Scope) error { + out.Servers = *(*[]string)(unsafe.Pointer(&in.Servers)) + return nil +} + +// Convert_kubeone_DNSConfig_To_v1beta1_DNSConfig is an autogenerated conversion function. +func Convert_kubeone_DNSConfig_To_v1beta1_DNSConfig(in *kubeone.DNSConfig, out *DNSConfig, s conversion.Scope) error { + return autoConvert_kubeone_DNSConfig_To_v1beta1_DNSConfig(in, out, s) +} + +func autoConvert_v1beta1_DigitalOceanSpec_To_kubeone_DigitalOceanSpec(in *DigitalOceanSpec, out *kubeone.DigitalOceanSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_DigitalOceanSpec_To_kubeone_DigitalOceanSpec is an autogenerated conversion function. +func Convert_v1beta1_DigitalOceanSpec_To_kubeone_DigitalOceanSpec(in *DigitalOceanSpec, out *kubeone.DigitalOceanSpec, s conversion.Scope) error { + return autoConvert_v1beta1_DigitalOceanSpec_To_kubeone_DigitalOceanSpec(in, out, s) +} + +func autoConvert_kubeone_DigitalOceanSpec_To_v1beta1_DigitalOceanSpec(in *kubeone.DigitalOceanSpec, out *DigitalOceanSpec, s conversion.Scope) error { + return nil +} + +// Convert_kubeone_DigitalOceanSpec_To_v1beta1_DigitalOceanSpec is an autogenerated conversion function. +func Convert_kubeone_DigitalOceanSpec_To_v1beta1_DigitalOceanSpec(in *kubeone.DigitalOceanSpec, out *DigitalOceanSpec, s conversion.Scope) error { + return autoConvert_kubeone_DigitalOceanSpec_To_v1beta1_DigitalOceanSpec(in, out, s) +} + +func autoConvert_v1beta1_DynamicAuditLog_To_kubeone_DynamicAuditLog(in *DynamicAuditLog, out *kubeone.DynamicAuditLog, s conversion.Scope) error { + out.Enable = in.Enable + return nil +} + +// Convert_v1beta1_DynamicAuditLog_To_kubeone_DynamicAuditLog is an autogenerated conversion function. +func Convert_v1beta1_DynamicAuditLog_To_kubeone_DynamicAuditLog(in *DynamicAuditLog, out *kubeone.DynamicAuditLog, s conversion.Scope) error { + return autoConvert_v1beta1_DynamicAuditLog_To_kubeone_DynamicAuditLog(in, out, s) +} + +func autoConvert_kubeone_DynamicAuditLog_To_v1beta1_DynamicAuditLog(in *kubeone.DynamicAuditLog, out *DynamicAuditLog, s conversion.Scope) error { + out.Enable = in.Enable + return nil +} + +// Convert_kubeone_DynamicAuditLog_To_v1beta1_DynamicAuditLog is an autogenerated conversion function. +func Convert_kubeone_DynamicAuditLog_To_v1beta1_DynamicAuditLog(in *kubeone.DynamicAuditLog, out *DynamicAuditLog, s conversion.Scope) error { + return autoConvert_kubeone_DynamicAuditLog_To_v1beta1_DynamicAuditLog(in, out, s) +} + +func autoConvert_v1beta1_DynamicWorkerConfig_To_kubeone_DynamicWorkerConfig(in *DynamicWorkerConfig, out *kubeone.DynamicWorkerConfig, s conversion.Scope) error { + out.Name = in.Name + out.Replicas = (*int)(unsafe.Pointer(in.Replicas)) + if err := Convert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec(&in.Config, &out.Config, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DynamicWorkerConfig_To_kubeone_DynamicWorkerConfig is an autogenerated conversion function. +func Convert_v1beta1_DynamicWorkerConfig_To_kubeone_DynamicWorkerConfig(in *DynamicWorkerConfig, out *kubeone.DynamicWorkerConfig, s conversion.Scope) error { + return autoConvert_v1beta1_DynamicWorkerConfig_To_kubeone_DynamicWorkerConfig(in, out, s) +} + +func autoConvert_kubeone_DynamicWorkerConfig_To_v1beta1_DynamicWorkerConfig(in *kubeone.DynamicWorkerConfig, out *DynamicWorkerConfig, s conversion.Scope) error { + out.Name = in.Name + out.Replicas = (*int)(unsafe.Pointer(in.Replicas)) + if err := Convert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec(&in.Config, &out.Config, s); err != nil { + return err + } + return nil +} + +// Convert_kubeone_DynamicWorkerConfig_To_v1beta1_DynamicWorkerConfig is an autogenerated conversion function. +func Convert_kubeone_DynamicWorkerConfig_To_v1beta1_DynamicWorkerConfig(in *kubeone.DynamicWorkerConfig, out *DynamicWorkerConfig, s conversion.Scope) error { + return autoConvert_kubeone_DynamicWorkerConfig_To_v1beta1_DynamicWorkerConfig(in, out, s) +} + +func autoConvert_v1beta1_EncryptionProviders_To_kubeone_EncryptionProviders(in *EncryptionProviders, out *kubeone.EncryptionProviders, s conversion.Scope) error { + out.Enable = in.Enable + out.CustomEncryptionConfiguration = in.CustomEncryptionConfiguration + return nil +} + +// Convert_v1beta1_EncryptionProviders_To_kubeone_EncryptionProviders is an autogenerated conversion function. +func Convert_v1beta1_EncryptionProviders_To_kubeone_EncryptionProviders(in *EncryptionProviders, out *kubeone.EncryptionProviders, s conversion.Scope) error { + return autoConvert_v1beta1_EncryptionProviders_To_kubeone_EncryptionProviders(in, out, s) +} + +func autoConvert_kubeone_EncryptionProviders_To_v1beta1_EncryptionProviders(in *kubeone.EncryptionProviders, out *EncryptionProviders, s conversion.Scope) error { + out.Enable = in.Enable + out.CustomEncryptionConfiguration = in.CustomEncryptionConfiguration + return nil +} + +// Convert_kubeone_EncryptionProviders_To_v1beta1_EncryptionProviders is an autogenerated conversion function. +func Convert_kubeone_EncryptionProviders_To_v1beta1_EncryptionProviders(in *kubeone.EncryptionProviders, out *EncryptionProviders, s conversion.Scope) error { + return autoConvert_kubeone_EncryptionProviders_To_v1beta1_EncryptionProviders(in, out, s) +} + +func autoConvert_v1beta1_ExternalCNISpec_To_kubeone_ExternalCNISpec(in *ExternalCNISpec, out *kubeone.ExternalCNISpec, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_ExternalCNISpec_To_kubeone_ExternalCNISpec is an autogenerated conversion function. +func Convert_v1beta1_ExternalCNISpec_To_kubeone_ExternalCNISpec(in *ExternalCNISpec, out *kubeone.ExternalCNISpec, s conversion.Scope) error { + return autoConvert_v1beta1_ExternalCNISpec_To_kubeone_ExternalCNISpec(in, out, s) +} + +func autoConvert_kubeone_ExternalCNISpec_To_v1beta1_ExternalCNISpec(in *kubeone.ExternalCNISpec, out *ExternalCNISpec, s conversion.Scope) error { + return nil +} + +// Convert_kubeone_ExternalCNISpec_To_v1beta1_ExternalCNISpec is an autogenerated conversion function. +func Convert_kubeone_ExternalCNISpec_To_v1beta1_ExternalCNISpec(in *kubeone.ExternalCNISpec, out *ExternalCNISpec, s conversion.Scope) error { + return autoConvert_kubeone_ExternalCNISpec_To_v1beta1_ExternalCNISpec(in, out, s) +} + +func autoConvert_v1beta1_Features_To_kubeone_Features(in *Features, out *kubeone.Features, s conversion.Scope) error { + out.PodNodeSelector = (*kubeone.PodNodeSelector)(unsafe.Pointer(in.PodNodeSelector)) + // WARNING: in.PodPresets requires manual conversion: does not exist in peer-type + out.PodSecurityPolicy = (*kubeone.PodSecurityPolicy)(unsafe.Pointer(in.PodSecurityPolicy)) + out.StaticAuditLog = (*kubeone.StaticAuditLog)(unsafe.Pointer(in.StaticAuditLog)) + out.DynamicAuditLog = (*kubeone.DynamicAuditLog)(unsafe.Pointer(in.DynamicAuditLog)) + out.MetricsServer = (*kubeone.MetricsServer)(unsafe.Pointer(in.MetricsServer)) + out.OpenIDConnect = (*kubeone.OpenIDConnect)(unsafe.Pointer(in.OpenIDConnect)) + out.EncryptionProviders = (*kubeone.EncryptionProviders)(unsafe.Pointer(in.EncryptionProviders)) + return nil +} + +func autoConvert_kubeone_Features_To_v1beta1_Features(in *kubeone.Features, out *Features, s conversion.Scope) error { + out.PodNodeSelector = (*PodNodeSelector)(unsafe.Pointer(in.PodNodeSelector)) + out.PodSecurityPolicy = (*PodSecurityPolicy)(unsafe.Pointer(in.PodSecurityPolicy)) + out.StaticAuditLog = (*StaticAuditLog)(unsafe.Pointer(in.StaticAuditLog)) + out.DynamicAuditLog = (*DynamicAuditLog)(unsafe.Pointer(in.DynamicAuditLog)) + out.MetricsServer = (*MetricsServer)(unsafe.Pointer(in.MetricsServer)) + out.OpenIDConnect = (*OpenIDConnect)(unsafe.Pointer(in.OpenIDConnect)) + out.EncryptionProviders = (*EncryptionProviders)(unsafe.Pointer(in.EncryptionProviders)) + return nil +} + +// Convert_kubeone_Features_To_v1beta1_Features is an autogenerated conversion function. +func Convert_kubeone_Features_To_v1beta1_Features(in *kubeone.Features, out *Features, s conversion.Scope) error { + return autoConvert_kubeone_Features_To_v1beta1_Features(in, out, s) +} + +func autoConvert_v1beta1_GCESpec_To_kubeone_GCESpec(in *GCESpec, out *kubeone.GCESpec, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_GCESpec_To_kubeone_GCESpec is an autogenerated conversion function. +func Convert_v1beta1_GCESpec_To_kubeone_GCESpec(in *GCESpec, out *kubeone.GCESpec, s conversion.Scope) error { + return autoConvert_v1beta1_GCESpec_To_kubeone_GCESpec(in, out, s) +} + +func autoConvert_kubeone_GCESpec_To_v1beta1_GCESpec(in *kubeone.GCESpec, out *GCESpec, s conversion.Scope) error { + return nil +} + +// Convert_kubeone_GCESpec_To_v1beta1_GCESpec is an autogenerated conversion function. +func Convert_kubeone_GCESpec_To_v1beta1_GCESpec(in *kubeone.GCESpec, out *GCESpec, s conversion.Scope) error { + return autoConvert_kubeone_GCESpec_To_v1beta1_GCESpec(in, out, s) +} + +func autoConvert_v1beta1_HetznerSpec_To_kubeone_HetznerSpec(in *HetznerSpec, out *kubeone.HetznerSpec, s conversion.Scope) error { + out.NetworkID = in.NetworkID + return nil +} + +// Convert_v1beta1_HetznerSpec_To_kubeone_HetznerSpec is an autogenerated conversion function. +func Convert_v1beta1_HetznerSpec_To_kubeone_HetznerSpec(in *HetznerSpec, out *kubeone.HetznerSpec, s conversion.Scope) error { + return autoConvert_v1beta1_HetznerSpec_To_kubeone_HetznerSpec(in, out, s) +} + +func autoConvert_kubeone_HetznerSpec_To_v1beta1_HetznerSpec(in *kubeone.HetznerSpec, out *HetznerSpec, s conversion.Scope) error { + out.NetworkID = in.NetworkID + return nil +} + +// Convert_kubeone_HetznerSpec_To_v1beta1_HetznerSpec is an autogenerated conversion function. +func Convert_kubeone_HetznerSpec_To_v1beta1_HetznerSpec(in *kubeone.HetznerSpec, out *HetznerSpec, s conversion.Scope) error { + return autoConvert_kubeone_HetznerSpec_To_v1beta1_HetznerSpec(in, out, s) +} + +func autoConvert_v1beta1_HostConfig_To_kubeone_HostConfig(in *HostConfig, out *kubeone.HostConfig, s conversion.Scope) error { + out.ID = in.ID + out.PublicAddress = in.PublicAddress + out.PrivateAddress = in.PrivateAddress + out.SSHPort = in.SSHPort + out.SSHUsername = in.SSHUsername + out.SSHPrivateKeyFile = in.SSHPrivateKeyFile + out.SSHAgentSocket = in.SSHAgentSocket + out.Bastion = in.Bastion + out.BastionPort = in.BastionPort + out.BastionUser = in.BastionUser + out.Hostname = in.Hostname + out.IsLeader = in.IsLeader + out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) + out.OperatingSystem = kubeone.OperatingSystemName(in.OperatingSystem) + return nil +} + +// Convert_v1beta1_HostConfig_To_kubeone_HostConfig is an autogenerated conversion function. +func Convert_v1beta1_HostConfig_To_kubeone_HostConfig(in *HostConfig, out *kubeone.HostConfig, s conversion.Scope) error { + return autoConvert_v1beta1_HostConfig_To_kubeone_HostConfig(in, out, s) +} + +func autoConvert_kubeone_HostConfig_To_v1beta1_HostConfig(in *kubeone.HostConfig, out *HostConfig, s conversion.Scope) error { + out.ID = in.ID + out.PublicAddress = in.PublicAddress + out.PrivateAddress = in.PrivateAddress + out.SSHPort = in.SSHPort + out.SSHUsername = in.SSHUsername + out.SSHPrivateKeyFile = in.SSHPrivateKeyFile + out.SSHAgentSocket = in.SSHAgentSocket + out.Bastion = in.Bastion + out.BastionPort = in.BastionPort + out.BastionUser = in.BastionUser + out.Hostname = in.Hostname + out.IsLeader = in.IsLeader + out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) + // WARNING: in.Kubelet requires manual conversion: does not exist in peer-type + out.OperatingSystem = OperatingSystemName(in.OperatingSystem) + return nil +} + +func autoConvert_v1beta1_IPTables_To_kubeone_IPTables(in *IPTables, out *kubeone.IPTables, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_IPTables_To_kubeone_IPTables is an autogenerated conversion function. +func Convert_v1beta1_IPTables_To_kubeone_IPTables(in *IPTables, out *kubeone.IPTables, s conversion.Scope) error { + return autoConvert_v1beta1_IPTables_To_kubeone_IPTables(in, out, s) +} + +func autoConvert_kubeone_IPTables_To_v1beta1_IPTables(in *kubeone.IPTables, out *IPTables, s conversion.Scope) error { + return nil +} + +// Convert_kubeone_IPTables_To_v1beta1_IPTables is an autogenerated conversion function. +func Convert_kubeone_IPTables_To_v1beta1_IPTables(in *kubeone.IPTables, out *IPTables, s conversion.Scope) error { + return autoConvert_kubeone_IPTables_To_v1beta1_IPTables(in, out, s) +} + +func autoConvert_v1beta1_IPVSConfig_To_kubeone_IPVSConfig(in *IPVSConfig, out *kubeone.IPVSConfig, s conversion.Scope) error { + out.Scheduler = in.Scheduler + out.ExcludeCIDRs = *(*[]string)(unsafe.Pointer(&in.ExcludeCIDRs)) + out.StrictARP = in.StrictARP + out.TCPTimeout = in.TCPTimeout + out.TCPFinTimeout = in.TCPFinTimeout + out.UDPTimeout = in.UDPTimeout + return nil +} + +// Convert_v1beta1_IPVSConfig_To_kubeone_IPVSConfig is an autogenerated conversion function. +func Convert_v1beta1_IPVSConfig_To_kubeone_IPVSConfig(in *IPVSConfig, out *kubeone.IPVSConfig, s conversion.Scope) error { + return autoConvert_v1beta1_IPVSConfig_To_kubeone_IPVSConfig(in, out, s) +} + +func autoConvert_kubeone_IPVSConfig_To_v1beta1_IPVSConfig(in *kubeone.IPVSConfig, out *IPVSConfig, s conversion.Scope) error { + out.Scheduler = in.Scheduler + out.ExcludeCIDRs = *(*[]string)(unsafe.Pointer(&in.ExcludeCIDRs)) + out.StrictARP = in.StrictARP + out.TCPTimeout = in.TCPTimeout + out.TCPFinTimeout = in.TCPFinTimeout + out.UDPTimeout = in.UDPTimeout + return nil +} + +// Convert_kubeone_IPVSConfig_To_v1beta1_IPVSConfig is an autogenerated conversion function. +func Convert_kubeone_IPVSConfig_To_v1beta1_IPVSConfig(in *kubeone.IPVSConfig, out *IPVSConfig, s conversion.Scope) error { + return autoConvert_kubeone_IPVSConfig_To_v1beta1_IPVSConfig(in, out, s) +} + +func autoConvert_v1beta1_ImageAsset_To_kubeone_ImageAsset(in *ImageAsset, out *kubeone.ImageAsset, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset is an autogenerated conversion function. +func Convert_v1beta1_ImageAsset_To_kubeone_ImageAsset(in *ImageAsset, out *kubeone.ImageAsset, s conversion.Scope) error { + return autoConvert_v1beta1_ImageAsset_To_kubeone_ImageAsset(in, out, s) +} + +func autoConvert_kubeone_ImageAsset_To_v1beta1_ImageAsset(in *kubeone.ImageAsset, out *ImageAsset, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset is an autogenerated conversion function. +func Convert_kubeone_ImageAsset_To_v1beta1_ImageAsset(in *kubeone.ImageAsset, out *ImageAsset, s conversion.Scope) error { + return autoConvert_kubeone_ImageAsset_To_v1beta1_ImageAsset(in, out, s) +} + +func autoConvert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneCluster, out *kubeone.KubeOneCluster, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_v1beta1_ControlPlaneConfig_To_kubeone_ControlPlaneConfig(&in.ControlPlane, &out.ControlPlane, s); err != nil { + return err + } + if err := Convert_v1beta1_APIEndpoint_To_kubeone_APIEndpoint(&in.APIEndpoint, &out.APIEndpoint, s); err != nil { + return err + } + if err := Convert_v1beta1_CloudProviderSpec_To_kubeone_CloudProviderSpec(&in.CloudProvider, &out.CloudProvider, s); err != nil { + return err + } + if err := Convert_v1beta1_VersionConfig_To_kubeone_VersionConfig(&in.Versions, &out.Versions, s); err != nil { + return err + } + if err := Convert_v1beta1_ContainerRuntimeConfig_To_kubeone_ContainerRuntimeConfig(&in.ContainerRuntime, &out.ContainerRuntime, s); err != nil { + return err + } + if err := Convert_v1beta1_ClusterNetworkConfig_To_kubeone_ClusterNetworkConfig(&in.ClusterNetwork, &out.ClusterNetwork, s); err != nil { + return err + } + if err := Convert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig(&in.Proxy, &out.Proxy, s); err != nil { + return err + } + if err := Convert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig(&in.StaticWorkers, &out.StaticWorkers, s); err != nil { + return err + } + out.DynamicWorkers = *(*[]kubeone.DynamicWorkerConfig)(unsafe.Pointer(&in.DynamicWorkers)) + out.MachineController = (*kubeone.MachineControllerConfig)(unsafe.Pointer(in.MachineController)) + out.CABundle = in.CABundle + if err := Convert_v1beta1_Features_To_kubeone_Features(&in.Features, &out.Features, s); err != nil { + return err + } + out.Addons = (*kubeone.Addons)(unsafe.Pointer(in.Addons)) + out.SystemPackages = (*kubeone.SystemPackages)(unsafe.Pointer(in.SystemPackages)) + if err := Convert_v1beta1_AssetConfiguration_To_kubeone_AssetConfiguration(&in.AssetConfiguration, &out.AssetConfiguration, s); err != nil { + return err + } + out.RegistryConfiguration = (*kubeone.RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) + return nil +} + +// Convert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster is an autogenerated conversion function. +func Convert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneCluster, out *kubeone.KubeOneCluster, s conversion.Scope) error { + return autoConvert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(in, out, s) +} + +func autoConvert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in *kubeone.KubeOneCluster, out *KubeOneCluster, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_kubeone_ControlPlaneConfig_To_v1beta1_ControlPlaneConfig(&in.ControlPlane, &out.ControlPlane, s); err != nil { + return err + } + if err := Convert_kubeone_APIEndpoint_To_v1beta1_APIEndpoint(&in.APIEndpoint, &out.APIEndpoint, s); err != nil { + return err + } + if err := Convert_kubeone_CloudProviderSpec_To_v1beta1_CloudProviderSpec(&in.CloudProvider, &out.CloudProvider, s); err != nil { + return err + } + if err := Convert_kubeone_VersionConfig_To_v1beta1_VersionConfig(&in.Versions, &out.Versions, s); err != nil { + return err + } + if err := Convert_kubeone_ContainerRuntimeConfig_To_v1beta1_ContainerRuntimeConfig(&in.ContainerRuntime, &out.ContainerRuntime, s); err != nil { + return err + } + if err := Convert_kubeone_ClusterNetworkConfig_To_v1beta1_ClusterNetworkConfig(&in.ClusterNetwork, &out.ClusterNetwork, s); err != nil { + return err + } + if err := Convert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig(&in.Proxy, &out.Proxy, s); err != nil { + return err + } + if err := Convert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig(&in.StaticWorkers, &out.StaticWorkers, s); err != nil { + return err + } + out.DynamicWorkers = *(*[]DynamicWorkerConfig)(unsafe.Pointer(&in.DynamicWorkers)) + out.MachineController = (*MachineControllerConfig)(unsafe.Pointer(in.MachineController)) + out.CABundle = in.CABundle + if err := Convert_kubeone_Features_To_v1beta1_Features(&in.Features, &out.Features, s); err != nil { + return err + } + out.Addons = (*Addons)(unsafe.Pointer(in.Addons)) + out.SystemPackages = (*SystemPackages)(unsafe.Pointer(in.SystemPackages)) + if err := Convert_kubeone_AssetConfiguration_To_v1beta1_AssetConfiguration(&in.AssetConfiguration, &out.AssetConfiguration, s); err != nil { + return err + } + out.RegistryConfiguration = (*RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) + return nil +} + +// Convert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster is an autogenerated conversion function. +func Convert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in *kubeone.KubeOneCluster, out *KubeOneCluster, s conversion.Scope) error { + return autoConvert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in, out, s) +} + +func autoConvert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig(in *KubeProxyConfig, out *kubeone.KubeProxyConfig, s conversion.Scope) error { + out.SkipInstallation = in.SkipInstallation + out.IPVS = (*kubeone.IPVSConfig)(unsafe.Pointer(in.IPVS)) + out.IPTables = (*kubeone.IPTables)(unsafe.Pointer(in.IPTables)) + return nil +} + +// Convert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig(in *KubeProxyConfig, out *kubeone.KubeProxyConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig(in, out, s) +} + +func autoConvert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *kubeone.KubeProxyConfig, out *KubeProxyConfig, s conversion.Scope) error { + out.SkipInstallation = in.SkipInstallation + out.IPVS = (*IPVSConfig)(unsafe.Pointer(in.IPVS)) + out.IPTables = (*IPTables)(unsafe.Pointer(in.IPTables)) + return nil +} + +// Convert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig is an autogenerated conversion function. +func Convert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *kubeone.KubeProxyConfig, out *KubeProxyConfig, s conversion.Scope) error { + return autoConvert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in, out, s) +} + +func autoConvert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(in *MachineControllerConfig, out *kubeone.MachineControllerConfig, s conversion.Scope) error { + out.Deploy = in.Deploy + return nil +} + +// Convert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig is an autogenerated conversion function. +func Convert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(in *MachineControllerConfig, out *kubeone.MachineControllerConfig, s conversion.Scope) error { + return autoConvert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(in, out, s) +} + +func autoConvert_kubeone_MachineControllerConfig_To_v1beta1_MachineControllerConfig(in *kubeone.MachineControllerConfig, out *MachineControllerConfig, s conversion.Scope) error { + out.Deploy = in.Deploy + return nil +} + +// Convert_kubeone_MachineControllerConfig_To_v1beta1_MachineControllerConfig is an autogenerated conversion function. +func Convert_kubeone_MachineControllerConfig_To_v1beta1_MachineControllerConfig(in *kubeone.MachineControllerConfig, out *MachineControllerConfig, s conversion.Scope) error { + return autoConvert_kubeone_MachineControllerConfig_To_v1beta1_MachineControllerConfig(in, out, s) +} + +func autoConvert_v1beta1_MetricsServer_To_kubeone_MetricsServer(in *MetricsServer, out *kubeone.MetricsServer, s conversion.Scope) error { + out.Enable = in.Enable + return nil +} + +// Convert_v1beta1_MetricsServer_To_kubeone_MetricsServer is an autogenerated conversion function. +func Convert_v1beta1_MetricsServer_To_kubeone_MetricsServer(in *MetricsServer, out *kubeone.MetricsServer, s conversion.Scope) error { + return autoConvert_v1beta1_MetricsServer_To_kubeone_MetricsServer(in, out, s) +} + +func autoConvert_kubeone_MetricsServer_To_v1beta1_MetricsServer(in *kubeone.MetricsServer, out *MetricsServer, s conversion.Scope) error { + out.Enable = in.Enable + return nil +} + +// Convert_kubeone_MetricsServer_To_v1beta1_MetricsServer is an autogenerated conversion function. +func Convert_kubeone_MetricsServer_To_v1beta1_MetricsServer(in *kubeone.MetricsServer, out *MetricsServer, s conversion.Scope) error { + return autoConvert_kubeone_MetricsServer_To_v1beta1_MetricsServer(in, out, s) +} + +func autoConvert_v1beta1_NoneSpec_To_kubeone_NoneSpec(in *NoneSpec, out *kubeone.NoneSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_NoneSpec_To_kubeone_NoneSpec is an autogenerated conversion function. +func Convert_v1beta1_NoneSpec_To_kubeone_NoneSpec(in *NoneSpec, out *kubeone.NoneSpec, s conversion.Scope) error { + return autoConvert_v1beta1_NoneSpec_To_kubeone_NoneSpec(in, out, s) +} + +func autoConvert_kubeone_NoneSpec_To_v1beta1_NoneSpec(in *kubeone.NoneSpec, out *NoneSpec, s conversion.Scope) error { + return nil +} + +// Convert_kubeone_NoneSpec_To_v1beta1_NoneSpec is an autogenerated conversion function. +func Convert_kubeone_NoneSpec_To_v1beta1_NoneSpec(in *kubeone.NoneSpec, out *NoneSpec, s conversion.Scope) error { + return autoConvert_kubeone_NoneSpec_To_v1beta1_NoneSpec(in, out, s) +} + +func autoConvert_v1beta1_OpenIDConnect_To_kubeone_OpenIDConnect(in *OpenIDConnect, out *kubeone.OpenIDConnect, s conversion.Scope) error { + out.Enable = in.Enable + if err := Convert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(&in.Config, &out.Config, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_OpenIDConnect_To_kubeone_OpenIDConnect is an autogenerated conversion function. +func Convert_v1beta1_OpenIDConnect_To_kubeone_OpenIDConnect(in *OpenIDConnect, out *kubeone.OpenIDConnect, s conversion.Scope) error { + return autoConvert_v1beta1_OpenIDConnect_To_kubeone_OpenIDConnect(in, out, s) +} + +func autoConvert_kubeone_OpenIDConnect_To_v1beta1_OpenIDConnect(in *kubeone.OpenIDConnect, out *OpenIDConnect, s conversion.Scope) error { + out.Enable = in.Enable + if err := Convert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig(&in.Config, &out.Config, s); err != nil { + return err + } + return nil +} + +// Convert_kubeone_OpenIDConnect_To_v1beta1_OpenIDConnect is an autogenerated conversion function. +func Convert_kubeone_OpenIDConnect_To_v1beta1_OpenIDConnect(in *kubeone.OpenIDConnect, out *OpenIDConnect, s conversion.Scope) error { + return autoConvert_kubeone_OpenIDConnect_To_v1beta1_OpenIDConnect(in, out, s) +} + +func autoConvert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(in *OpenIDConnectConfig, out *kubeone.OpenIDConnectConfig, s conversion.Scope) error { + out.IssuerURL = in.IssuerURL + out.ClientID = in.ClientID + out.UsernameClaim = in.UsernameClaim + out.UsernamePrefix = in.UsernamePrefix + out.GroupsClaim = in.GroupsClaim + out.GroupsPrefix = in.GroupsPrefix + out.RequiredClaim = in.RequiredClaim + out.SigningAlgs = in.SigningAlgs + out.CAFile = in.CAFile + return nil +} + +// Convert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig is an autogenerated conversion function. +func Convert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(in *OpenIDConnectConfig, out *kubeone.OpenIDConnectConfig, s conversion.Scope) error { + return autoConvert_v1beta1_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(in, out, s) +} + +func autoConvert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig(in *kubeone.OpenIDConnectConfig, out *OpenIDConnectConfig, s conversion.Scope) error { + out.IssuerURL = in.IssuerURL + out.ClientID = in.ClientID + out.UsernameClaim = in.UsernameClaim + out.UsernamePrefix = in.UsernamePrefix + out.GroupsClaim = in.GroupsClaim + out.GroupsPrefix = in.GroupsPrefix + out.RequiredClaim = in.RequiredClaim + out.SigningAlgs = in.SigningAlgs + out.CAFile = in.CAFile + return nil +} + +// Convert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig is an autogenerated conversion function. +func Convert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig(in *kubeone.OpenIDConnectConfig, out *OpenIDConnectConfig, s conversion.Scope) error { + return autoConvert_kubeone_OpenIDConnectConfig_To_v1beta1_OpenIDConnectConfig(in, out, s) +} + +func autoConvert_v1beta1_OpenstackSpec_To_kubeone_OpenstackSpec(in *OpenstackSpec, out *kubeone.OpenstackSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_OpenstackSpec_To_kubeone_OpenstackSpec is an autogenerated conversion function. +func Convert_v1beta1_OpenstackSpec_To_kubeone_OpenstackSpec(in *OpenstackSpec, out *kubeone.OpenstackSpec, s conversion.Scope) error { + return autoConvert_v1beta1_OpenstackSpec_To_kubeone_OpenstackSpec(in, out, s) +} + +func autoConvert_kubeone_OpenstackSpec_To_v1beta1_OpenstackSpec(in *kubeone.OpenstackSpec, out *OpenstackSpec, s conversion.Scope) error { + return nil +} + +// Convert_kubeone_OpenstackSpec_To_v1beta1_OpenstackSpec is an autogenerated conversion function. +func Convert_kubeone_OpenstackSpec_To_v1beta1_OpenstackSpec(in *kubeone.OpenstackSpec, out *OpenstackSpec, s conversion.Scope) error { + return autoConvert_kubeone_OpenstackSpec_To_v1beta1_OpenstackSpec(in, out, s) +} + +func autoConvert_v1beta1_PodNodeSelector_To_kubeone_PodNodeSelector(in *PodNodeSelector, out *kubeone.PodNodeSelector, s conversion.Scope) error { + out.Enable = in.Enable + if err := Convert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig(&in.Config, &out.Config, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_PodNodeSelector_To_kubeone_PodNodeSelector is an autogenerated conversion function. +func Convert_v1beta1_PodNodeSelector_To_kubeone_PodNodeSelector(in *PodNodeSelector, out *kubeone.PodNodeSelector, s conversion.Scope) error { + return autoConvert_v1beta1_PodNodeSelector_To_kubeone_PodNodeSelector(in, out, s) +} + +func autoConvert_kubeone_PodNodeSelector_To_v1beta1_PodNodeSelector(in *kubeone.PodNodeSelector, out *PodNodeSelector, s conversion.Scope) error { + out.Enable = in.Enable + if err := Convert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig(&in.Config, &out.Config, s); err != nil { + return err + } + return nil +} + +// Convert_kubeone_PodNodeSelector_To_v1beta1_PodNodeSelector is an autogenerated conversion function. +func Convert_kubeone_PodNodeSelector_To_v1beta1_PodNodeSelector(in *kubeone.PodNodeSelector, out *PodNodeSelector, s conversion.Scope) error { + return autoConvert_kubeone_PodNodeSelector_To_v1beta1_PodNodeSelector(in, out, s) +} + +func autoConvert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig(in *PodNodeSelectorConfig, out *kubeone.PodNodeSelectorConfig, s conversion.Scope) error { + out.ConfigFilePath = in.ConfigFilePath + return nil +} + +// Convert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig is an autogenerated conversion function. +func Convert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig(in *PodNodeSelectorConfig, out *kubeone.PodNodeSelectorConfig, s conversion.Scope) error { + return autoConvert_v1beta1_PodNodeSelectorConfig_To_kubeone_PodNodeSelectorConfig(in, out, s) +} + +func autoConvert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig(in *kubeone.PodNodeSelectorConfig, out *PodNodeSelectorConfig, s conversion.Scope) error { + out.ConfigFilePath = in.ConfigFilePath + return nil +} + +// Convert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig is an autogenerated conversion function. +func Convert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig(in *kubeone.PodNodeSelectorConfig, out *PodNodeSelectorConfig, s conversion.Scope) error { + return autoConvert_kubeone_PodNodeSelectorConfig_To_v1beta1_PodNodeSelectorConfig(in, out, s) +} + +func autoConvert_v1beta1_PodSecurityPolicy_To_kubeone_PodSecurityPolicy(in *PodSecurityPolicy, out *kubeone.PodSecurityPolicy, s conversion.Scope) error { + out.Enable = in.Enable + return nil +} + +// Convert_v1beta1_PodSecurityPolicy_To_kubeone_PodSecurityPolicy is an autogenerated conversion function. +func Convert_v1beta1_PodSecurityPolicy_To_kubeone_PodSecurityPolicy(in *PodSecurityPolicy, out *kubeone.PodSecurityPolicy, s conversion.Scope) error { + return autoConvert_v1beta1_PodSecurityPolicy_To_kubeone_PodSecurityPolicy(in, out, s) +} + +func autoConvert_kubeone_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *kubeone.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error { + out.Enable = in.Enable + return nil +} + +// Convert_kubeone_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy is an autogenerated conversion function. +func Convert_kubeone_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *kubeone.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error { + return autoConvert_kubeone_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in, out, s) +} + +func autoConvert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec(in *ProviderSpec, out *kubeone.ProviderSpec, s conversion.Scope) error { + out.CloudProviderSpec = *(*json.RawMessage)(unsafe.Pointer(&in.CloudProviderSpec)) + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.MachineAnnotations = *(*map[string]string)(unsafe.Pointer(&in.MachineAnnotations)) + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) + out.SSHPublicKeys = *(*[]string)(unsafe.Pointer(&in.SSHPublicKeys)) + out.OperatingSystem = in.OperatingSystem + out.OperatingSystemSpec = *(*json.RawMessage)(unsafe.Pointer(&in.OperatingSystemSpec)) + out.Network = (*kubeone.ProviderStaticNetworkConfig)(unsafe.Pointer(in.Network)) + out.OverwriteCloudConfig = (*string)(unsafe.Pointer(in.OverwriteCloudConfig)) + return nil +} + +// Convert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec is an autogenerated conversion function. +func Convert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec(in *ProviderSpec, out *kubeone.ProviderSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ProviderSpec_To_kubeone_ProviderSpec(in, out, s) +} + +func autoConvert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec(in *kubeone.ProviderSpec, out *ProviderSpec, s conversion.Scope) error { + out.CloudProviderSpec = *(*json.RawMessage)(unsafe.Pointer(&in.CloudProviderSpec)) + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.MachineAnnotations = *(*map[string]string)(unsafe.Pointer(&in.MachineAnnotations)) + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) + out.SSHPublicKeys = *(*[]string)(unsafe.Pointer(&in.SSHPublicKeys)) + out.OperatingSystem = in.OperatingSystem + out.OperatingSystemSpec = *(*json.RawMessage)(unsafe.Pointer(&in.OperatingSystemSpec)) + out.Network = (*ProviderStaticNetworkConfig)(unsafe.Pointer(in.Network)) + out.OverwriteCloudConfig = (*string)(unsafe.Pointer(in.OverwriteCloudConfig)) + return nil +} + +// Convert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec is an autogenerated conversion function. +func Convert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec(in *kubeone.ProviderSpec, out *ProviderSpec, s conversion.Scope) error { + return autoConvert_kubeone_ProviderSpec_To_v1beta1_ProviderSpec(in, out, s) +} + +func autoConvert_v1beta1_ProviderStaticNetworkConfig_To_kubeone_ProviderStaticNetworkConfig(in *ProviderStaticNetworkConfig, out *kubeone.ProviderStaticNetworkConfig, s conversion.Scope) error { + out.CIDR = in.CIDR + out.Gateway = in.Gateway + if err := Convert_v1beta1_DNSConfig_To_kubeone_DNSConfig(&in.DNS, &out.DNS, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_ProviderStaticNetworkConfig_To_kubeone_ProviderStaticNetworkConfig is an autogenerated conversion function. +func Convert_v1beta1_ProviderStaticNetworkConfig_To_kubeone_ProviderStaticNetworkConfig(in *ProviderStaticNetworkConfig, out *kubeone.ProviderStaticNetworkConfig, s conversion.Scope) error { + return autoConvert_v1beta1_ProviderStaticNetworkConfig_To_kubeone_ProviderStaticNetworkConfig(in, out, s) +} + +func autoConvert_kubeone_ProviderStaticNetworkConfig_To_v1beta1_ProviderStaticNetworkConfig(in *kubeone.ProviderStaticNetworkConfig, out *ProviderStaticNetworkConfig, s conversion.Scope) error { + out.CIDR = in.CIDR + out.Gateway = in.Gateway + if err := Convert_kubeone_DNSConfig_To_v1beta1_DNSConfig(&in.DNS, &out.DNS, s); err != nil { + return err + } + return nil +} + +// Convert_kubeone_ProviderStaticNetworkConfig_To_v1beta1_ProviderStaticNetworkConfig is an autogenerated conversion function. +func Convert_kubeone_ProviderStaticNetworkConfig_To_v1beta1_ProviderStaticNetworkConfig(in *kubeone.ProviderStaticNetworkConfig, out *ProviderStaticNetworkConfig, s conversion.Scope) error { + return autoConvert_kubeone_ProviderStaticNetworkConfig_To_v1beta1_ProviderStaticNetworkConfig(in, out, s) +} + +func autoConvert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig(in *ProxyConfig, out *kubeone.ProxyConfig, s conversion.Scope) error { + out.HTTP = in.HTTP + out.HTTPS = in.HTTPS + out.NoProxy = in.NoProxy + return nil +} + +// Convert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig is an autogenerated conversion function. +func Convert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig(in *ProxyConfig, out *kubeone.ProxyConfig, s conversion.Scope) error { + return autoConvert_v1beta1_ProxyConfig_To_kubeone_ProxyConfig(in, out, s) +} + +func autoConvert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig(in *kubeone.ProxyConfig, out *ProxyConfig, s conversion.Scope) error { + out.HTTP = in.HTTP + out.HTTPS = in.HTTPS + out.NoProxy = in.NoProxy + return nil +} + +// Convert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig is an autogenerated conversion function. +func Convert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig(in *kubeone.ProxyConfig, out *ProxyConfig, s conversion.Scope) error { + return autoConvert_kubeone_ProxyConfig_To_v1beta1_ProxyConfig(in, out, s) +} + +func autoConvert_v1beta1_RegistryConfiguration_To_kubeone_RegistryConfiguration(in *RegistryConfiguration, out *kubeone.RegistryConfiguration, s conversion.Scope) error { + out.OverwriteRegistry = in.OverwriteRegistry + out.InsecureRegistry = in.InsecureRegistry + return nil +} + +// Convert_v1beta1_RegistryConfiguration_To_kubeone_RegistryConfiguration is an autogenerated conversion function. +func Convert_v1beta1_RegistryConfiguration_To_kubeone_RegistryConfiguration(in *RegistryConfiguration, out *kubeone.RegistryConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_RegistryConfiguration_To_kubeone_RegistryConfiguration(in, out, s) +} + +func autoConvert_kubeone_RegistryConfiguration_To_v1beta1_RegistryConfiguration(in *kubeone.RegistryConfiguration, out *RegistryConfiguration, s conversion.Scope) error { + out.OverwriteRegistry = in.OverwriteRegistry + out.InsecureRegistry = in.InsecureRegistry + return nil +} + +// Convert_kubeone_RegistryConfiguration_To_v1beta1_RegistryConfiguration is an autogenerated conversion function. +func Convert_kubeone_RegistryConfiguration_To_v1beta1_RegistryConfiguration(in *kubeone.RegistryConfiguration, out *RegistryConfiguration, s conversion.Scope) error { + return autoConvert_kubeone_RegistryConfiguration_To_v1beta1_RegistryConfiguration(in, out, s) +} + +func autoConvert_v1beta1_StaticAuditLog_To_kubeone_StaticAuditLog(in *StaticAuditLog, out *kubeone.StaticAuditLog, s conversion.Scope) error { + out.Enable = in.Enable + if err := Convert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig(&in.Config, &out.Config, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_StaticAuditLog_To_kubeone_StaticAuditLog is an autogenerated conversion function. +func Convert_v1beta1_StaticAuditLog_To_kubeone_StaticAuditLog(in *StaticAuditLog, out *kubeone.StaticAuditLog, s conversion.Scope) error { + return autoConvert_v1beta1_StaticAuditLog_To_kubeone_StaticAuditLog(in, out, s) +} + +func autoConvert_kubeone_StaticAuditLog_To_v1beta1_StaticAuditLog(in *kubeone.StaticAuditLog, out *StaticAuditLog, s conversion.Scope) error { + out.Enable = in.Enable + if err := Convert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig(&in.Config, &out.Config, s); err != nil { + return err + } + return nil +} + +// Convert_kubeone_StaticAuditLog_To_v1beta1_StaticAuditLog is an autogenerated conversion function. +func Convert_kubeone_StaticAuditLog_To_v1beta1_StaticAuditLog(in *kubeone.StaticAuditLog, out *StaticAuditLog, s conversion.Scope) error { + return autoConvert_kubeone_StaticAuditLog_To_v1beta1_StaticAuditLog(in, out, s) +} + +func autoConvert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig(in *StaticAuditLogConfig, out *kubeone.StaticAuditLogConfig, s conversion.Scope) error { + out.PolicyFilePath = in.PolicyFilePath + out.LogPath = in.LogPath + out.LogMaxAge = in.LogMaxAge + out.LogMaxBackup = in.LogMaxBackup + out.LogMaxSize = in.LogMaxSize + return nil +} + +// Convert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig is an autogenerated conversion function. +func Convert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig(in *StaticAuditLogConfig, out *kubeone.StaticAuditLogConfig, s conversion.Scope) error { + return autoConvert_v1beta1_StaticAuditLogConfig_To_kubeone_StaticAuditLogConfig(in, out, s) +} + +func autoConvert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig(in *kubeone.StaticAuditLogConfig, out *StaticAuditLogConfig, s conversion.Scope) error { + out.PolicyFilePath = in.PolicyFilePath + out.LogPath = in.LogPath + out.LogMaxAge = in.LogMaxAge + out.LogMaxBackup = in.LogMaxBackup + out.LogMaxSize = in.LogMaxSize + return nil +} + +// Convert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig is an autogenerated conversion function. +func Convert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig(in *kubeone.StaticAuditLogConfig, out *StaticAuditLogConfig, s conversion.Scope) error { + return autoConvert_kubeone_StaticAuditLogConfig_To_v1beta1_StaticAuditLogConfig(in, out, s) +} + +func autoConvert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig(in *StaticWorkersConfig, out *kubeone.StaticWorkersConfig, s conversion.Scope) error { + if in.Hosts != nil { + in, out := &in.Hosts, &out.Hosts + *out = make([]kubeone.HostConfig, len(*in)) + for i := range *in { + if err := Convert_v1beta1_HostConfig_To_kubeone_HostConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Hosts = nil + } + return nil +} + +// Convert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig is an autogenerated conversion function. +func Convert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig(in *StaticWorkersConfig, out *kubeone.StaticWorkersConfig, s conversion.Scope) error { + return autoConvert_v1beta1_StaticWorkersConfig_To_kubeone_StaticWorkersConfig(in, out, s) +} + +func autoConvert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig(in *kubeone.StaticWorkersConfig, out *StaticWorkersConfig, s conversion.Scope) error { + if in.Hosts != nil { + in, out := &in.Hosts, &out.Hosts + *out = make([]HostConfig, len(*in)) + for i := range *in { + if err := Convert_kubeone_HostConfig_To_v1beta1_HostConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Hosts = nil + } + return nil +} + +// Convert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig is an autogenerated conversion function. +func Convert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig(in *kubeone.StaticWorkersConfig, out *StaticWorkersConfig, s conversion.Scope) error { + return autoConvert_kubeone_StaticWorkersConfig_To_v1beta1_StaticWorkersConfig(in, out, s) +} + +func autoConvert_v1beta1_SystemPackages_To_kubeone_SystemPackages(in *SystemPackages, out *kubeone.SystemPackages, s conversion.Scope) error { + out.ConfigureRepositories = in.ConfigureRepositories + return nil +} + +// Convert_v1beta1_SystemPackages_To_kubeone_SystemPackages is an autogenerated conversion function. +func Convert_v1beta1_SystemPackages_To_kubeone_SystemPackages(in *SystemPackages, out *kubeone.SystemPackages, s conversion.Scope) error { + return autoConvert_v1beta1_SystemPackages_To_kubeone_SystemPackages(in, out, s) +} + +func autoConvert_kubeone_SystemPackages_To_v1beta1_SystemPackages(in *kubeone.SystemPackages, out *SystemPackages, s conversion.Scope) error { + out.ConfigureRepositories = in.ConfigureRepositories + return nil +} + +// Convert_kubeone_SystemPackages_To_v1beta1_SystemPackages is an autogenerated conversion function. +func Convert_kubeone_SystemPackages_To_v1beta1_SystemPackages(in *kubeone.SystemPackages, out *SystemPackages, s conversion.Scope) error { + return autoConvert_kubeone_SystemPackages_To_v1beta1_SystemPackages(in, out, s) +} + +func autoConvert_v1beta1_VersionConfig_To_kubeone_VersionConfig(in *VersionConfig, out *kubeone.VersionConfig, s conversion.Scope) error { + out.Kubernetes = in.Kubernetes + return nil +} + +// Convert_v1beta1_VersionConfig_To_kubeone_VersionConfig is an autogenerated conversion function. +func Convert_v1beta1_VersionConfig_To_kubeone_VersionConfig(in *VersionConfig, out *kubeone.VersionConfig, s conversion.Scope) error { + return autoConvert_v1beta1_VersionConfig_To_kubeone_VersionConfig(in, out, s) +} + +func autoConvert_kubeone_VersionConfig_To_v1beta1_VersionConfig(in *kubeone.VersionConfig, out *VersionConfig, s conversion.Scope) error { + out.Kubernetes = in.Kubernetes + return nil +} + +// Convert_kubeone_VersionConfig_To_v1beta1_VersionConfig is an autogenerated conversion function. +func Convert_kubeone_VersionConfig_To_v1beta1_VersionConfig(in *kubeone.VersionConfig, out *VersionConfig, s conversion.Scope) error { + return autoConvert_kubeone_VersionConfig_To_v1beta1_VersionConfig(in, out, s) +} + +func autoConvert_v1beta1_VsphereSpec_To_kubeone_VsphereSpec(in *VsphereSpec, out *kubeone.VsphereSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_VsphereSpec_To_kubeone_VsphereSpec is an autogenerated conversion function. +func Convert_v1beta1_VsphereSpec_To_kubeone_VsphereSpec(in *VsphereSpec, out *kubeone.VsphereSpec, s conversion.Scope) error { + return autoConvert_v1beta1_VsphereSpec_To_kubeone_VsphereSpec(in, out, s) +} + +func autoConvert_kubeone_VsphereSpec_To_v1beta1_VsphereSpec(in *kubeone.VsphereSpec, out *VsphereSpec, s conversion.Scope) error { + return nil +} + +// Convert_kubeone_VsphereSpec_To_v1beta1_VsphereSpec is an autogenerated conversion function. +func Convert_kubeone_VsphereSpec_To_v1beta1_VsphereSpec(in *kubeone.VsphereSpec, out *VsphereSpec, s conversion.Scope) error { + return autoConvert_kubeone_VsphereSpec_To_v1beta1_VsphereSpec(in, out, s) +} + +func autoConvert_v1beta1_WeaveNetSpec_To_kubeone_WeaveNetSpec(in *WeaveNetSpec, out *kubeone.WeaveNetSpec, s conversion.Scope) error { + out.Encrypted = in.Encrypted + return nil +} + +// Convert_v1beta1_WeaveNetSpec_To_kubeone_WeaveNetSpec is an autogenerated conversion function. +func Convert_v1beta1_WeaveNetSpec_To_kubeone_WeaveNetSpec(in *WeaveNetSpec, out *kubeone.WeaveNetSpec, s conversion.Scope) error { + return autoConvert_v1beta1_WeaveNetSpec_To_kubeone_WeaveNetSpec(in, out, s) +} + +func autoConvert_kubeone_WeaveNetSpec_To_v1beta1_WeaveNetSpec(in *kubeone.WeaveNetSpec, out *WeaveNetSpec, s conversion.Scope) error { + out.Encrypted = in.Encrypted + return nil +} + +// Convert_kubeone_WeaveNetSpec_To_v1beta1_WeaveNetSpec is an autogenerated conversion function. +func Convert_kubeone_WeaveNetSpec_To_v1beta1_WeaveNetSpec(in *kubeone.WeaveNetSpec, out *WeaveNetSpec, s conversion.Scope) error { + return autoConvert_kubeone_WeaveNetSpec_To_v1beta1_WeaveNetSpec(in, out, s) +} From 642810fbdb15a12f6cc7fe3deac79b6f55136390 Mon Sep 17 00:00:00 2001 From: Obinna Odirionye Date: Wed, 5 Jan 2022 16:14:49 +0400 Subject: [PATCH 13/40] Update pkg/cmd/config.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marko Mudrinić --- pkg/cmd/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index 10432324d..cbabf1720 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -501,7 +501,7 @@ kind: KubeOneCluster name: {{ .ClusterName }} versions: - kubernetes: "{{ .KubernetesVersion }}" + kubernetes: "{{ .KubernetesVersion }}" clusterNetwork: # the subnet used for pods (default: 10.244.0.0/16) From be868173162b4ce9e0649f19c055d88bf7e71bac Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 5 Jan 2022 16:33:22 +0400 Subject: [PATCH 14/40] chore: add conversion --- pkg/apis/kubeone/types.go | 2 +- pkg/apis/kubeone/v1beta2/defaults.go | 3 +++ pkg/templates/kubeadm/v1beta2/kubeadm.go | 2 -- pkg/templates/kubeadm/v1beta3/kubeadm.go | 2 -- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index ee700ec4a..4b3ebc293 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -182,7 +182,7 @@ type KubeletConfig struct { // EvictionHard configure --eviction-hard command-line flag of the kubelet. // See more at: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ EvictionHard map[string]string `json:"evictionHard,omitempty"` - //ContainerLogsMaxSize configure --container-logs-max-size command-line flag of the kubelet. Defaults to 100Mi. + // ContainerLogsMaxSize configure --container-logs-max-size command-line flag of the kubelet. Defaults to 100Mi. // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } diff --git a/pkg/apis/kubeone/v1beta2/defaults.go b/pkg/apis/kubeone/v1beta2/defaults.go index 30c86f924..a55479fea 100644 --- a/pkg/apis/kubeone/v1beta2/defaults.go +++ b/pkg/apis/kubeone/v1beta2/defaults.go @@ -71,6 +71,9 @@ func SetDefaults_Hosts(obj *KubeOneCluster) { // defined setDefaultLeader = false } + if obj.ControlPlane.Hosts[idx].Kubelet.ContainerLogMaxSize == "" { + obj.ControlPlane.Hosts[idx].Kubelet.ContainerLogMaxSize = "100Mi" + } obj.ControlPlane.Hosts[idx].ID = idx defaultHostConfig(&obj.ControlPlane.Hosts[idx]) if obj.ControlPlane.Hosts[idx].Taints == nil { diff --git a/pkg/templates/kubeadm/v1beta2/kubeadm.go b/pkg/templates/kubeadm/v1beta2/kubeadm.go index d74653b72..90d98a7e3 100644 --- a/pkg/templates/kubeadm/v1beta2/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta2/kubeadm.go @@ -431,8 +431,6 @@ func newNodeRegistration(s *state.State, host kubeoneapi.HostConfig) kubeadmv1be if m := host.Kubelet.ContainerLogMaxSize; m != "" { kubeletCLIFlags["container-log-max-size"] = m - } else { - kubeletCLIFlags["container-log-max-size"] = "100Mi" } return kubeadmv1beta2.NodeRegistrationOptions{ diff --git a/pkg/templates/kubeadm/v1beta3/kubeadm.go b/pkg/templates/kubeadm/v1beta3/kubeadm.go index 246c96f9e..6cc163b77 100644 --- a/pkg/templates/kubeadm/v1beta3/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta3/kubeadm.go @@ -431,8 +431,6 @@ func newNodeRegistration(s *state.State, host kubeoneapi.HostConfig) kubeadmv1be if m := host.Kubelet.ContainerLogMaxSize; m != "" { kubeletCLIFlags["container-log-max-size"] = m - } else { - kubeletCLIFlags["container-log-max-size"] = "100Mi" } return kubeadmv1beta3.NodeRegistrationOptions{ From a515c7b07b8ff47d6f878e8621d638f7923332e7 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 5 Jan 2022 16:38:39 +0400 Subject: [PATCH 15/40] docs: update API docs --- docs/api_reference/v1beta1.en.md | 2 +- docs/api_reference/v1beta2.en.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/api_reference/v1beta1.en.md b/docs/api_reference/v1beta1.en.md index 994ce3940..f75dee236 100644 --- a/docs/api_reference/v1beta1.en.md +++ b/docs/api_reference/v1beta1.en.md @@ -1,6 +1,6 @@ +++ title = "v1beta1 API Reference" -date = 2021-12-23T21:13:02+05:00 +date = 2022-01-05T16:38:05+04:00 weight = 11 +++ ## v1beta1 diff --git a/docs/api_reference/v1beta2.en.md b/docs/api_reference/v1beta2.en.md index d050194aa..79ee17ecb 100644 --- a/docs/api_reference/v1beta2.en.md +++ b/docs/api_reference/v1beta2.en.md @@ -1,6 +1,6 @@ +++ title = "v1beta2 API Reference" -date = 2021-12-23T21:13:02+05:00 +date = 2022-01-05T16:38:05+04:00 weight = 11 +++ ## v1beta2 @@ -467,6 +467,7 @@ KubeletConfig provides some kubelet configuration options | systemReserved | SystemReserved configure --system-reserved command-line flag of the kubelet. See more at: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ | map[string]string | false | | kubeReserved | KubeReserved configure --kube-reserved command-line flag of the kubelet. See more at: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ | map[string]string | false | | evictionHard | EvictionHard configure --eviction-hard command-line flag of the kubelet. See more at: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ | map[string]string | false | +| containerLogMaxSize | ContainerLogMaxSize configure --container-log-max-size command-line flag of the kubelet. Default value is 100Mi See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ | string | false | [Back to Group](#v1beta2) From 6fa119fe2ca74c28b0eba4fad4f10dd3b9a71a6a Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Fri, 7 Jan 2022 18:01:37 +0400 Subject: [PATCH 16/40] docs: revert to Top level API --- docs/api_reference/v1beta1.en.md | 13 ++++++- docs/api_reference/v1beta2.en.md | 15 +++++++- pkg/apis/kubeone/types.go | 12 ++++-- pkg/apis/kubeone/v1beta1/conversion.go | 4 ++ pkg/apis/kubeone/v1beta1/types.go | 5 +++ .../v1beta1/zz_generated.conversion.go | 30 +++++++++++++++ .../kubeone/v1beta1/zz_generated.deepcopy.go | 17 +++++++++ pkg/apis/kubeone/v1beta2/defaults.go | 4 -- pkg/apis/kubeone/v1beta2/types.go | 12 ++++-- .../v1beta2/zz_generated.conversion.go | 38 ++++++++++++++++++- .../kubeone/v1beta2/zz_generated.deepcopy.go | 17 +++++++++ pkg/apis/kubeone/zz_generated.deepcopy.go | 17 +++++++++ pkg/cmd/config.go | 16 +++++++- pkg/templates/kubeadm/v1beta2/kubeadm.go | 30 +++++++++------ pkg/templates/kubeadm/v1beta3/kubeadm.go | 30 +++++++++------ 15 files changed, 219 insertions(+), 41 deletions(-) diff --git a/docs/api_reference/v1beta1.en.md b/docs/api_reference/v1beta1.en.md index f75dee236..d0e2a1694 100644 --- a/docs/api_reference/v1beta1.en.md +++ b/docs/api_reference/v1beta1.en.md @@ -1,6 +1,6 @@ +++ title = "v1beta1 API Reference" -date = 2022-01-05T16:38:05+04:00 +date = 2022-01-07T18:00:12+04:00 weight = 11 +++ ## v1beta1 @@ -36,6 +36,7 @@ weight = 11 * [ImageAsset](#imageasset) * [KubeOneCluster](#kubeonecluster) * [KubeProxyConfig](#kubeproxyconfig) +* [KubeletConfiguration](#kubeletconfiguration) * [MachineControllerConfig](#machinecontrollerconfig) * [MetricsServer](#metricsserver) * [NoneSpec](#nonespec) @@ -432,6 +433,7 @@ KubeOneCluster is KubeOne Cluster API Schema | systemPackages | SystemPackages configure kubeone behaviour regarding OS packages. | *[SystemPackages](#systempackages) | false | | assetConfiguration | AssetConfiguration configures how are binaries and container images downloaded | [AssetConfiguration](#assetconfiguration) | false | | registryConfiguration | RegistryConfiguration configures how Docker images are pulled from an image registry | *[RegistryConfiguration](#registryconfiguration) | false | +| kubeletConfiguration | KubeletConfiguration configures the kubelet | [KubeletConfiguration](#kubeletconfiguration) | false | [Back to Group](#v1beta1) @@ -447,6 +449,15 @@ KubeProxyConfig defines configured kube-proxy mode, default is iptables mode [Back to Group](#v1beta1) +### KubeletConfiguration + +Kubele + +| Field | Description | Scheme | Required | +| ----- | ----------- | ------ | -------- | + +[Back to Group](#v1beta1) + ### MachineControllerConfig MachineControllerConfig configures kubermatic machine-controller deployment diff --git a/docs/api_reference/v1beta2.en.md b/docs/api_reference/v1beta2.en.md index 79ee17ecb..e4b279e66 100644 --- a/docs/api_reference/v1beta2.en.md +++ b/docs/api_reference/v1beta2.en.md @@ -1,6 +1,6 @@ +++ title = "v1beta2 API Reference" -date = 2022-01-05T16:38:05+04:00 +date = 2022-01-07T18:00:12+04:00 weight = 11 +++ ## v1beta2 @@ -39,6 +39,7 @@ weight = 11 * [KubeOneCluster](#kubeonecluster) * [KubeProxyConfig](#kubeproxyconfig) * [KubeletConfig](#kubeletconfig) +* [KubeletConfiguration](#kubeletconfiguration) * [MachineControllerConfig](#machinecontrollerconfig) * [MetricsServer](#metricsserver) * [NoneSpec](#nonespec) @@ -443,6 +444,7 @@ KubeOneCluster is KubeOne Cluster API Schema | addons | Addons are used to deploy additional manifests. | *[Addons](#addons) | false | | systemPackages | SystemPackages configure kubeone behaviour regarding OS packages. | *[SystemPackages](#systempackages) | false | | registryConfiguration | RegistryConfiguration configures how Docker images are pulled from an image registry | *[RegistryConfiguration](#registryconfiguration) | false | +| kubeletConfiguration | KubeletConfiguration configures the kubelet | [KubeletConfiguration](#kubeletconfiguration) | true | [Back to Group](#v1beta2) @@ -467,7 +469,16 @@ KubeletConfig provides some kubelet configuration options | systemReserved | SystemReserved configure --system-reserved command-line flag of the kubelet. See more at: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ | map[string]string | false | | kubeReserved | KubeReserved configure --kube-reserved command-line flag of the kubelet. See more at: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ | map[string]string | false | | evictionHard | EvictionHard configure --eviction-hard command-line flag of the kubelet. See more at: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ | map[string]string | false | -| containerLogMaxSize | ContainerLogMaxSize configure --container-log-max-size command-line flag of the kubelet. Default value is 100Mi See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ | string | false | + +[Back to Group](#v1beta2) + +### KubeletConfiguration + +KubeletConfiguration + +| Field | Description | Scheme | Required | +| ----- | ----------- | ------ | -------- | +| containerLogMaxSize | ContainerLogsMaxSize configure --container-logs-max-size command-line flag of the kubelet. Defaults to 100Mi. See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ | string | false | [Back to Group](#v1beta2) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index 4b3ebc293..229b4c839 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -63,6 +63,15 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` + // KubeletConfiguration configures the kubelet + KubeletConfiguration KubeletConfiguration `json:"kubeletConfiguration"` +} + +// KubeletConfiguration +type KubeletConfiguration struct { + // ContainerLogsMaxSize configure --container-logs-max-size command-line flag of the kubelet. Defaults to 100Mi. + // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ + ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } // ContainerRuntimeConfig @@ -182,9 +191,6 @@ type KubeletConfig struct { // EvictionHard configure --eviction-hard command-line flag of the kubelet. // See more at: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ EvictionHard map[string]string `json:"evictionHard,omitempty"` - // ContainerLogsMaxSize configure --container-logs-max-size command-line flag of the kubelet. Defaults to 100Mi. - // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ - ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } // APIEndpoint is the endpoint used to communicate with the Kubernetes API diff --git a/pkg/apis/kubeone/v1beta1/conversion.go b/pkg/apis/kubeone/v1beta1/conversion.go index b37723e90..bc26b3ec7 100644 --- a/pkg/apis/kubeone/v1beta1/conversion.go +++ b/pkg/apis/kubeone/v1beta1/conversion.go @@ -69,3 +69,7 @@ func Convert_kubeone_HostConfig_To_v1beta1_HostConfig(in *kubeone.HostConfig, ou // explicitly skip kubelet conversion omitted in autoConvert_kubeone_HostConfig_To_v1beta1_HostConfig return autoConvert_kubeone_HostConfig_To_v1beta1_HostConfig(in, out, scope) } +func Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, scope conversion.Scope) error { + //skip conversion + return nil +} diff --git a/pkg/apis/kubeone/v1beta1/types.go b/pkg/apis/kubeone/v1beta1/types.go index 5c39e534f..78583e6cb 100644 --- a/pkg/apis/kubeone/v1beta1/types.go +++ b/pkg/apis/kubeone/v1beta1/types.go @@ -63,8 +63,13 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` + // KubeletConfiguration configures the kubelet + KubeletConfiguration KubeletConfiguration `json:"kubeletConfiguration,omitempty"` } +// Kubele +type KubeletConfiguration struct{} + // ContainerRuntimeConfig type ContainerRuntimeConfig struct { Docker *ContainerRuntimeDocker `json:"docker,omitempty"` diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go index 908e816bf..2977f2867 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go @@ -318,6 +318,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*KubeletConfiguration)(nil), (*kubeone.KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(a.(*KubeletConfiguration), b.(*kubeone.KubeletConfiguration), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*MachineControllerConfig)(nil), (*kubeone.MachineControllerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(a.(*MachineControllerConfig), b.(*kubeone.MachineControllerConfig), scope) }); err != nil { @@ -538,6 +543,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*kubeone.KubeletConfiguration)(nil), (*KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(a.(*kubeone.KubeletConfiguration), b.(*KubeletConfiguration), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*CloudProviderSpec)(nil), (*kubeone.CloudProviderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CloudProviderSpec_To_kubeone_CloudProviderSpec(a.(*CloudProviderSpec), b.(*kubeone.CloudProviderSpec), scope) }); err != nil { @@ -1341,6 +1351,9 @@ func autoConvert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneClu return err } out.RegistryConfiguration = (*kubeone.RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) + if err := Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { + return err + } return nil } @@ -1387,6 +1400,9 @@ func autoConvert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in *kubeone.Ku return err } out.RegistryConfiguration = (*RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) + if err := Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { + return err + } return nil } @@ -1419,6 +1435,20 @@ func Convert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *kubeone.Kube return autoConvert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in, out, s) } +func autoConvert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration is an autogenerated conversion function. +func Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in, out, s) +} + +func autoConvert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error { + // WARNING: in.ContainerLogMaxSize requires manual conversion: does not exist in peer-type + return nil +} + func autoConvert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(in *MachineControllerConfig, out *kubeone.MachineControllerConfig, s conversion.Scope) error { out.Deploy = in.Deploy return nil diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go index c366ad081..aae7a79f8 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go @@ -725,6 +725,7 @@ func (in *KubeOneCluster) DeepCopyInto(out *KubeOneCluster) { *out = new(RegistryConfiguration) **out = **in } + out.KubeletConfiguration = in.KubeletConfiguration return } @@ -772,6 +773,22 @@ func (in *KubeProxyConfig) DeepCopy() *KubeProxyConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfiguration. +func (in *KubeletConfiguration) DeepCopy() *KubeletConfiguration { + if in == nil { + return nil + } + out := new(KubeletConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineControllerConfig) DeepCopyInto(out *MachineControllerConfig) { *out = *in diff --git a/pkg/apis/kubeone/v1beta2/defaults.go b/pkg/apis/kubeone/v1beta2/defaults.go index a55479fea..76d0c4faf 100644 --- a/pkg/apis/kubeone/v1beta2/defaults.go +++ b/pkg/apis/kubeone/v1beta2/defaults.go @@ -71,9 +71,6 @@ func SetDefaults_Hosts(obj *KubeOneCluster) { // defined setDefaultLeader = false } - if obj.ControlPlane.Hosts[idx].Kubelet.ContainerLogMaxSize == "" { - obj.ControlPlane.Hosts[idx].Kubelet.ContainerLogMaxSize = "100Mi" - } obj.ControlPlane.Hosts[idx].ID = idx defaultHostConfig(&obj.ControlPlane.Hosts[idx]) if obj.ControlPlane.Hosts[idx].Taints == nil { @@ -136,7 +133,6 @@ func SetDefaults_ContainerRuntime(obj *KubeOneCluster) { obj.ContainerRuntime.Containerd = &ContainerRuntimeContainerd{} } } - func SetDefaults_ClusterNetwork(obj *KubeOneCluster) { obj.ClusterNetwork.PodSubnet = defaults(obj.ClusterNetwork.PodSubnet, DefaultPodSubnet) obj.ClusterNetwork.ServiceSubnet = defaults(obj.ClusterNetwork.ServiceSubnet, DefaultServiceSubnet) diff --git a/pkg/apis/kubeone/v1beta2/types.go b/pkg/apis/kubeone/v1beta2/types.go index 6456fabdd..58b13e2a5 100644 --- a/pkg/apis/kubeone/v1beta2/types.go +++ b/pkg/apis/kubeone/v1beta2/types.go @@ -61,6 +61,15 @@ type KubeOneCluster struct { SystemPackages *SystemPackages `json:"systemPackages,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` + // KubeletConfiguration configures the kubelet + KubeletConfiguration KubeletConfiguration `json:"kubeletConfiguration"` +} + +// KubeletConfiguration +type KubeletConfiguration struct { + // ContainerLogsMaxSize configure --container-logs-max-size command-line flag of the kubelet. Defaults to 100Mi. + // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ + ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } // ContainerRuntimeConfig @@ -180,9 +189,6 @@ type KubeletConfig struct { // EvictionHard configure --eviction-hard command-line flag of the kubelet. // See more at: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ EvictionHard map[string]string `json:"evictionHard,omitempty"` - // ContainerLogMaxSize configure --container-log-max-size command-line flag of the kubelet. Default value is 100Mi - // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ - ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } // APIEndpoint is the endpoint used to communicate with the Kubernetes API diff --git a/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go index 7469880a9..ef23e170e 100644 --- a/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go @@ -373,6 +373,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*KubeletConfiguration)(nil), (*kubeone.KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration(a.(*KubeletConfiguration), b.(*kubeone.KubeletConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.KubeletConfiguration)(nil), (*KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration(a.(*kubeone.KubeletConfiguration), b.(*KubeletConfiguration), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*MachineControllerConfig)(nil), (*kubeone.MachineControllerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta2_MachineControllerConfig_To_kubeone_MachineControllerConfig(a.(*MachineControllerConfig), b.(*kubeone.MachineControllerConfig), scope) }); err != nil { @@ -1346,6 +1356,9 @@ func autoConvert_v1beta2_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneClu out.Addons = (*kubeone.Addons)(unsafe.Pointer(in.Addons)) out.SystemPackages = (*kubeone.SystemPackages)(unsafe.Pointer(in.SystemPackages)) out.RegistryConfiguration = (*kubeone.RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) + if err := Convert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { + return err + } return nil } @@ -1390,6 +1403,9 @@ func autoConvert_kubeone_KubeOneCluster_To_v1beta2_KubeOneCluster(in *kubeone.Ku out.SystemPackages = (*SystemPackages)(unsafe.Pointer(in.SystemPackages)) // WARNING: in.AssetConfiguration requires manual conversion: does not exist in peer-type out.RegistryConfiguration = (*RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) + if err := Convert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { + return err + } return nil } @@ -1421,7 +1437,6 @@ func autoConvert_v1beta2_KubeletConfig_To_kubeone_KubeletConfig(in *KubeletConfi out.SystemReserved = *(*map[string]string)(unsafe.Pointer(&in.SystemReserved)) out.KubeReserved = *(*map[string]string)(unsafe.Pointer(&in.KubeReserved)) out.EvictionHard = *(*map[string]string)(unsafe.Pointer(&in.EvictionHard)) - out.ContainerLogMaxSize = in.ContainerLogMaxSize return nil } @@ -1434,7 +1449,6 @@ func autoConvert_kubeone_KubeletConfig_To_v1beta2_KubeletConfig(in *kubeone.Kube out.SystemReserved = *(*map[string]string)(unsafe.Pointer(&in.SystemReserved)) out.KubeReserved = *(*map[string]string)(unsafe.Pointer(&in.KubeReserved)) out.EvictionHard = *(*map[string]string)(unsafe.Pointer(&in.EvictionHard)) - out.ContainerLogMaxSize = in.ContainerLogMaxSize return nil } @@ -1443,6 +1457,26 @@ func Convert_kubeone_KubeletConfig_To_v1beta2_KubeletConfig(in *kubeone.KubeletC return autoConvert_kubeone_KubeletConfig_To_v1beta2_KubeletConfig(in, out, s) } +func autoConvert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { + out.ContainerLogMaxSize = in.ContainerLogMaxSize + return nil +} + +// Convert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration is an autogenerated conversion function. +func Convert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { + return autoConvert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration(in, out, s) +} + +func autoConvert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error { + out.ContainerLogMaxSize = in.ContainerLogMaxSize + return nil +} + +// Convert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration is an autogenerated conversion function. +func Convert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error { + return autoConvert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration(in, out, s) +} + func autoConvert_v1beta2_MachineControllerConfig_To_kubeone_MachineControllerConfig(in *MachineControllerConfig, out *kubeone.MachineControllerConfig, s conversion.Scope) error { out.Deploy = in.Deploy return nil diff --git a/pkg/apis/kubeone/v1beta2/zz_generated.deepcopy.go b/pkg/apis/kubeone/v1beta2/zz_generated.deepcopy.go index f942d839e..4966df5fb 100644 --- a/pkg/apis/kubeone/v1beta2/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/v1beta2/zz_generated.deepcopy.go @@ -766,6 +766,7 @@ func (in *KubeOneCluster) DeepCopyInto(out *KubeOneCluster) { *out = new(RegistryConfiguration) **out = **in } + out.KubeletConfiguration = in.KubeletConfiguration return } @@ -850,6 +851,22 @@ func (in *KubeletConfig) DeepCopy() *KubeletConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfiguration. +func (in *KubeletConfiguration) DeepCopy() *KubeletConfiguration { + if in == nil { + return nil + } + out := new(KubeletConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineControllerConfig) DeepCopyInto(out *MachineControllerConfig) { *out = *in diff --git a/pkg/apis/kubeone/zz_generated.deepcopy.go b/pkg/apis/kubeone/zz_generated.deepcopy.go index 340c1065f..4bfc2adb5 100644 --- a/pkg/apis/kubeone/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/zz_generated.deepcopy.go @@ -791,6 +791,7 @@ func (in *KubeOneCluster) DeepCopyInto(out *KubeOneCluster) { *out = new(RegistryConfiguration) **out = **in } + out.KubeletConfiguration = in.KubeletConfiguration return } @@ -875,6 +876,22 @@ func (in *KubeletConfig) DeepCopy() *KubeletConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfiguration. +func (in *KubeletConfiguration) DeepCopy() *KubeletConfiguration { + if in == nil { + return nil + } + out := new(KubeletConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineControllerConfig) DeepCopyInto(out *MachineControllerConfig) { *out = *in diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index cbabf1720..308340f63 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -48,8 +48,9 @@ const ( type printOpts struct { FullConfig bool `longflag:"full" shortflag:"f"` - ClusterName string `longflag:"cluster-name" shortflag:"n"` - KubernetesVersion string `longflag:"kubernetes-version" shortflag:"k"` + ClusterName string `longflag:"cluster-name" shortflag:"n"` + KubernetesVersion string `longflag:"kubernetes-version" shortflag:"k"` + ContainerLogMaxSize string `longflag:"container-log-max-size"` CloudProviderName string `longflag:"provider" shortflag:"p"` CloudProviderExternal bool @@ -136,6 +137,13 @@ func configPrintCmd() *cobra.Command { defaultKubernetesVersion, "Kubernetes version") + cmd.Flags().StringVarP( + &opts.ContainerLogMaxSize, + longFlagName(opts, "ContainerLogMaxSize"), + shortFlagName(opts, "ContainerLogMaxSize"), + "100Mi", + "ContainerLogMaxSize") + cmd.Flags().StringVarP( &opts.CloudProviderName, longFlagName(opts, "CloudProviderName"), @@ -289,6 +297,8 @@ func createAndPrintManifest(printOptions *printOpts) error { // Version cfg.Set(yamled.Path{"versions", "kubernetes"}, printOptions.KubernetesVersion) + cfg.Set(yamled.Path{"kubeletConfiguration", "ContainerLogMaxSize"}, printOptions.ContainerLogMaxSize) + // Provider var providerVal struct{} switch printOptions.CloudProviderName { @@ -502,6 +512,8 @@ name: {{ .ClusterName }} versions: kubernetes: "{{ .KubernetesVersion }}" +kubeletConfiguration: + containerLogMaxSize: "{{ .ContainerLogMaxSize }}" clusterNetwork: # the subnet used for pods (default: 10.244.0.0/16) diff --git a/pkg/templates/kubeadm/v1beta2/kubeadm.go b/pkg/templates/kubeadm/v1beta2/kubeadm.go index 90d98a7e3..b8f875cb9 100644 --- a/pkg/templates/kubeadm/v1beta2/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta2/kubeadm.go @@ -166,10 +166,11 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -357,10 +358,11 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -429,10 +431,6 @@ func newNodeRegistration(s *state.State, host kubeoneapi.HostConfig) kubeadmv1be kubeletCLIFlags["eviction-hard"] = kubeoneapi.MapStringStringToString(m, "<") } - if m := host.Kubelet.ContainerLogMaxSize; m != "" { - kubeletCLIFlags["container-log-max-size"] = m - } - return kubeadmv1beta2.NodeRegistrationOptions{ Name: host.Hostname, Taints: host.Taints, @@ -472,3 +470,11 @@ func kubeProxyConfiguration(s *state.State) *kubeproxyv1alpha1.KubeProxyConfigur return kubeProxyConfig } + +func getContainerLogMaxSize(value string) string { + if value == "" { + return "100Mi" + } + + return value +} diff --git a/pkg/templates/kubeadm/v1beta3/kubeadm.go b/pkg/templates/kubeadm/v1beta3/kubeadm.go index 6cc163b77..11d5347bd 100644 --- a/pkg/templates/kubeadm/v1beta3/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta3/kubeadm.go @@ -166,10 +166,11 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -357,10 +358,11 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje APIVersion: "kubelet.config.k8s.io/v1beta1", Kind: "KubeletConfiguration", }, - CgroupDriver: "systemd", - ReadOnlyPort: 0, - RotateCertificates: true, - ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + CgroupDriver: "systemd", + ReadOnlyPort: 0, + RotateCertificates: true, + ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, + ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -429,10 +431,6 @@ func newNodeRegistration(s *state.State, host kubeoneapi.HostConfig) kubeadmv1be kubeletCLIFlags["eviction-hard"] = kubeoneapi.MapStringStringToString(m, "<") } - if m := host.Kubelet.ContainerLogMaxSize; m != "" { - kubeletCLIFlags["container-log-max-size"] = m - } - return kubeadmv1beta3.NodeRegistrationOptions{ Name: host.Hostname, Taints: host.Taints, @@ -472,3 +470,11 @@ func kubeProxyConfiguration(s *state.State) *kubeproxyv1alpha1.KubeProxyConfigur return kubeProxyConfig } + +func getContainerLogMaxSize(value string) string { + if value == "" { + return "100Mi" + } + + return value +} From a68236fc64a291831b8403b275e7eac15a7f5db0 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Fri, 7 Jan 2022 18:06:26 +0400 Subject: [PATCH 17/40] docs: update lint --- pkg/apis/kubeone/v1beta1/conversion.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apis/kubeone/v1beta1/conversion.go b/pkg/apis/kubeone/v1beta1/conversion.go index bc26b3ec7..4404bf968 100644 --- a/pkg/apis/kubeone/v1beta1/conversion.go +++ b/pkg/apis/kubeone/v1beta1/conversion.go @@ -70,6 +70,6 @@ func Convert_kubeone_HostConfig_To_v1beta1_HostConfig(in *kubeone.HostConfig, ou return autoConvert_kubeone_HostConfig_To_v1beta1_HostConfig(in, out, scope) } func Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, scope conversion.Scope) error { - //skip conversion + // skip conversion return nil } From 8027737dd11b44a2e83d45158a5b654d0c41481f Mon Sep 17 00:00:00 2001 From: Obinna Odirionye Date: Fri, 21 Jan 2022 18:25:46 +0400 Subject: [PATCH 18/40] Update pkg/apis/kubeone/types.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marko Mudrinić --- pkg/apis/kubeone/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index f1e57f231..6f3e59b2f 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -69,7 +69,7 @@ type KubeOneCluster struct { // KubeletConfiguration type KubeletConfiguration struct { - // ContainerLogsMaxSize configure --container-logs-max-size command-line flag of the kubelet. Defaults to 100Mi. + // ContainerLogMaxSize configures the maximum size of container log file before it is rotated // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } From eb949c3c57d876736e2fb3c919d0d955a1ad4717 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Mon, 24 Jan 2022 16:51:43 +0400 Subject: [PATCH 19/40] refactor: change container max log size --- pkg/apis/kubeone/config/config.go | 5 ++ pkg/apis/kubeone/types.go | 14 +--- pkg/apis/kubeone/v1beta1/conversion.go | 2 +- pkg/apis/kubeone/v1beta1/types.go | 5 -- .../v1beta1/zz_generated.conversion.go | 37 +-------- .../kubeone/v1beta1/zz_generated.deepcopy.go | 17 ---- pkg/apis/kubeone/v1beta2/defaults.go | 1 + .../v1beta2/zz_generated.conversion.go | 79 +------------------ pkg/apis/kubeone/zz_generated.deepcopy.go | 31 ++------ pkg/cmd/config.go | 31 ++++---- pkg/templates/kubeadm/v1beta2/kubeadm.go | 12 +-- pkg/templates/kubeadm/v1beta3/kubeadm.go | 12 +-- 12 files changed, 41 insertions(+), 205 deletions(-) diff --git a/pkg/apis/kubeone/config/config.go b/pkg/apis/kubeone/config/config.go index 5c9be3ae8..9bc2124da 100644 --- a/pkg/apis/kubeone/config/config.go +++ b/pkg/apis/kubeone/config/config.go @@ -225,6 +225,11 @@ func SetKubeOneClusterDynamicDefaults(cfg *kubeoneapi.KubeOneCluster, credential cfg.CloudProvider.CloudConfig = cc } + // check if the container log max size is set, if not set it to the of 100Mi + if cfg.LoggingConfig.ContainerLogMaxSize == "" { + cfg.LoggingConfig.ContainerLogMaxSize = "100Mi" + } + // Default the AssetsConfiguration internal API cfg.DefaultAssetConfiguration() diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index 6f3e59b2f..f8ca94856 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -18,7 +18,6 @@ package kubeone import ( "encoding/json" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -63,12 +62,12 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` - // KubeletConfiguration configures the kubelet - KubeletConfiguration KubeletConfiguration `json:"kubeletConfiguration"` + // LoggingConfig configures the Kubelet's log configuration + LoggingConfig LoggingConfig `json:"loggingConfig,omitempty"` } -// KubeletConfiguration -type KubeletConfiguration struct { +// LoggingConfig +type LoggingConfig struct { // ContainerLogMaxSize configures the maximum size of container log file before it is rotated // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` @@ -223,8 +222,6 @@ type CloudProviderSpec struct { GCE *GCESpec `json:"gce,omitempty"` // Hetzner Hetzner *HetznerSpec `json:"hetzner,omitempty"` - // Nutanix - Nutanix *NutanixSpec `json:"nutanix,omitempty"` // Openstack Openstack *OpenstackSpec `json:"openstack,omitempty"` // EquinixMetal @@ -253,9 +250,6 @@ type HetznerSpec struct { NetworkID string `json:"networkID,omitempty"` } -// NutanixSpec defines the Nutanix provider -type NutanixSpec struct{} - // OpenstackSpec defines the Openstack provider type OpenstackSpec struct{} diff --git a/pkg/apis/kubeone/v1beta1/conversion.go b/pkg/apis/kubeone/v1beta1/conversion.go index 4404bf968..a41a4b96c 100644 --- a/pkg/apis/kubeone/v1beta1/conversion.go +++ b/pkg/apis/kubeone/v1beta1/conversion.go @@ -69,7 +69,7 @@ func Convert_kubeone_HostConfig_To_v1beta1_HostConfig(in *kubeone.HostConfig, ou // explicitly skip kubelet conversion omitted in autoConvert_kubeone_HostConfig_To_v1beta1_HostConfig return autoConvert_kubeone_HostConfig_To_v1beta1_HostConfig(in, out, scope) } -func Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, scope conversion.Scope) error { +func Convert_kubeone_LoggingConfig_To_v1beta1_LoggingConfig(in *kubeone.LoggingConfig, out *kubeone.LoggingConfig, scope conversion.Scope) error { // skip conversion return nil } diff --git a/pkg/apis/kubeone/v1beta1/types.go b/pkg/apis/kubeone/v1beta1/types.go index 78583e6cb..5c39e534f 100644 --- a/pkg/apis/kubeone/v1beta1/types.go +++ b/pkg/apis/kubeone/v1beta1/types.go @@ -63,13 +63,8 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` - // KubeletConfiguration configures the kubelet - KubeletConfiguration KubeletConfiguration `json:"kubeletConfiguration,omitempty"` } -// Kubele -type KubeletConfiguration struct{} - // ContainerRuntimeConfig type ContainerRuntimeConfig struct { Docker *ContainerRuntimeDocker `json:"docker,omitempty"` diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go index c46df1f00..e0859c869 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go @@ -318,11 +318,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeletConfiguration)(nil), (*kubeone.KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(a.(*KubeletConfiguration), b.(*kubeone.KubeletConfiguration), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*MachineControllerConfig)(nil), (*kubeone.MachineControllerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(a.(*MachineControllerConfig), b.(*kubeone.MachineControllerConfig), scope) }); err != nil { @@ -543,11 +538,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*kubeone.KubeletConfiguration)(nil), (*KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(a.(*kubeone.KubeletConfiguration), b.(*KubeletConfiguration), scope) - }); err != nil { - return err - } if err := s.AddConversionFunc((*CloudProviderSpec)(nil), (*kubeone.CloudProviderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CloudProviderSpec_To_kubeone_CloudProviderSpec(a.(*CloudProviderSpec), b.(*kubeone.CloudProviderSpec), scope) }); err != nil { @@ -850,7 +840,6 @@ func autoConvert_kubeone_CloudProviderSpec_To_v1beta1_CloudProviderSpec(in *kube out.DigitalOcean = (*DigitalOceanSpec)(unsafe.Pointer(in.DigitalOcean)) out.GCE = (*GCESpec)(unsafe.Pointer(in.GCE)) out.Hetzner = (*HetznerSpec)(unsafe.Pointer(in.Hetzner)) - // WARNING: in.Nutanix requires manual conversion: does not exist in peer-type out.Openstack = (*OpenstackSpec)(unsafe.Pointer(in.Openstack)) // WARNING: in.EquinixMetal requires manual conversion: does not exist in peer-type out.Vsphere = (*VsphereSpec)(unsafe.Pointer(in.Vsphere)) @@ -1352,9 +1341,6 @@ func autoConvert_v1beta1_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneClu return err } out.RegistryConfiguration = (*kubeone.RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - if err := Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { - return err - } return nil } @@ -1401,17 +1387,10 @@ func autoConvert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in *kubeone.Ku return err } out.RegistryConfiguration = (*RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - if err := Convert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { - return err - } + // WARNING: in.LoggingConfig requires manual conversion: does not exist in peer-type return nil } -// Convert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster is an autogenerated conversion function. -func Convert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in *kubeone.KubeOneCluster, out *KubeOneCluster, s conversion.Scope) error { - return autoConvert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in, out, s) -} - func autoConvert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig(in *KubeProxyConfig, out *kubeone.KubeProxyConfig, s conversion.Scope) error { out.SkipInstallation = in.SkipInstallation out.IPVS = (*kubeone.IPVSConfig)(unsafe.Pointer(in.IPVS)) @@ -1436,20 +1415,6 @@ func Convert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *kubeone.Kube return autoConvert_kubeone_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in, out, s) } -func autoConvert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration is an autogenerated conversion function. -func Convert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { - return autoConvert_v1beta1_KubeletConfiguration_To_kubeone_KubeletConfiguration(in, out, s) -} - -func autoConvert_kubeone_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error { - // WARNING: in.ContainerLogMaxSize requires manual conversion: does not exist in peer-type - return nil -} - func autoConvert_v1beta1_MachineControllerConfig_To_kubeone_MachineControllerConfig(in *MachineControllerConfig, out *kubeone.MachineControllerConfig, s conversion.Scope) error { out.Deploy = in.Deploy return nil diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go index aae7a79f8..c366ad081 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.deepcopy.go @@ -725,7 +725,6 @@ func (in *KubeOneCluster) DeepCopyInto(out *KubeOneCluster) { *out = new(RegistryConfiguration) **out = **in } - out.KubeletConfiguration = in.KubeletConfiguration return } @@ -773,22 +772,6 @@ func (in *KubeProxyConfig) DeepCopy() *KubeProxyConfig { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfiguration. -func (in *KubeletConfiguration) DeepCopy() *KubeletConfiguration { - if in == nil { - return nil - } - out := new(KubeletConfiguration) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineControllerConfig) DeepCopyInto(out *MachineControllerConfig) { *out = *in diff --git a/pkg/apis/kubeone/v1beta2/defaults.go b/pkg/apis/kubeone/v1beta2/defaults.go index 76d0c4faf..30c86f924 100644 --- a/pkg/apis/kubeone/v1beta2/defaults.go +++ b/pkg/apis/kubeone/v1beta2/defaults.go @@ -133,6 +133,7 @@ func SetDefaults_ContainerRuntime(obj *KubeOneCluster) { obj.ContainerRuntime.Containerd = &ContainerRuntimeContainerd{} } } + func SetDefaults_ClusterNetwork(obj *KubeOneCluster) { obj.ClusterNetwork.PodSubnet = defaults(obj.ClusterNetwork.PodSubnet, DefaultPodSubnet) obj.ClusterNetwork.ServiceSubnet = defaults(obj.ClusterNetwork.ServiceSubnet, DefaultServiceSubnet) diff --git a/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go index a4174fbb1..d1457c294 100644 --- a/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go @@ -373,16 +373,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeletConfiguration)(nil), (*kubeone.KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration(a.(*KubeletConfiguration), b.(*kubeone.KubeletConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.KubeletConfiguration)(nil), (*KubeletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration(a.(*kubeone.KubeletConfiguration), b.(*KubeletConfiguration), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*MachineControllerConfig)(nil), (*kubeone.MachineControllerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta2_MachineControllerConfig_To_kubeone_MachineControllerConfig(a.(*MachineControllerConfig), b.(*kubeone.MachineControllerConfig), scope) }); err != nil { @@ -413,16 +403,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NutanixSpec)(nil), (*kubeone.NutanixSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_NutanixSpec_To_kubeone_NutanixSpec(a.(*NutanixSpec), b.(*kubeone.NutanixSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*kubeone.NutanixSpec)(nil), (*NutanixSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_NutanixSpec_To_v1beta2_NutanixSpec(a.(*kubeone.NutanixSpec), b.(*NutanixSpec), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*OpenIDConnect)(nil), (*kubeone.OpenIDConnect)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta2_OpenIDConnect_To_kubeone_OpenIDConnect(a.(*OpenIDConnect), b.(*kubeone.OpenIDConnect), scope) }); err != nil { @@ -808,7 +788,7 @@ func autoConvert_v1beta2_CloudProviderSpec_To_kubeone_CloudProviderSpec(in *Clou out.DigitalOcean = (*kubeone.DigitalOceanSpec)(unsafe.Pointer(in.DigitalOcean)) out.GCE = (*kubeone.GCESpec)(unsafe.Pointer(in.GCE)) out.Hetzner = (*kubeone.HetznerSpec)(unsafe.Pointer(in.Hetzner)) - out.Nutanix = (*kubeone.NutanixSpec)(unsafe.Pointer(in.Nutanix)) + // WARNING: in.Nutanix requires manual conversion: does not exist in peer-type out.Openstack = (*kubeone.OpenstackSpec)(unsafe.Pointer(in.Openstack)) out.EquinixMetal = (*kubeone.EquinixMetalSpec)(unsafe.Pointer(in.EquinixMetal)) out.Vsphere = (*kubeone.VsphereSpec)(unsafe.Pointer(in.Vsphere)) @@ -816,11 +796,6 @@ func autoConvert_v1beta2_CloudProviderSpec_To_kubeone_CloudProviderSpec(in *Clou return nil } -// Convert_v1beta2_CloudProviderSpec_To_kubeone_CloudProviderSpec is an autogenerated conversion function. -func Convert_v1beta2_CloudProviderSpec_To_kubeone_CloudProviderSpec(in *CloudProviderSpec, out *kubeone.CloudProviderSpec, s conversion.Scope) error { - return autoConvert_v1beta2_CloudProviderSpec_To_kubeone_CloudProviderSpec(in, out, s) -} - func autoConvert_kubeone_CloudProviderSpec_To_v1beta2_CloudProviderSpec(in *kubeone.CloudProviderSpec, out *CloudProviderSpec, s conversion.Scope) error { out.External = in.External out.CloudConfig = in.CloudConfig @@ -830,7 +805,6 @@ func autoConvert_kubeone_CloudProviderSpec_To_v1beta2_CloudProviderSpec(in *kube out.DigitalOcean = (*DigitalOceanSpec)(unsafe.Pointer(in.DigitalOcean)) out.GCE = (*GCESpec)(unsafe.Pointer(in.GCE)) out.Hetzner = (*HetznerSpec)(unsafe.Pointer(in.Hetzner)) - out.Nutanix = (*NutanixSpec)(unsafe.Pointer(in.Nutanix)) out.Openstack = (*OpenstackSpec)(unsafe.Pointer(in.Openstack)) out.EquinixMetal = (*EquinixMetalSpec)(unsafe.Pointer(in.EquinixMetal)) out.Vsphere = (*VsphereSpec)(unsafe.Pointer(in.Vsphere)) @@ -1368,17 +1342,10 @@ func autoConvert_v1beta2_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneClu out.Addons = (*kubeone.Addons)(unsafe.Pointer(in.Addons)) out.SystemPackages = (*kubeone.SystemPackages)(unsafe.Pointer(in.SystemPackages)) out.RegistryConfiguration = (*kubeone.RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - if err := Convert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { - return err - } + // WARNING: in.KubeletConfiguration requires manual conversion: does not exist in peer-type return nil } -// Convert_v1beta2_KubeOneCluster_To_kubeone_KubeOneCluster is an autogenerated conversion function. -func Convert_v1beta2_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneCluster, out *kubeone.KubeOneCluster, s conversion.Scope) error { - return autoConvert_v1beta2_KubeOneCluster_To_kubeone_KubeOneCluster(in, out, s) -} - func autoConvert_kubeone_KubeOneCluster_To_v1beta2_KubeOneCluster(in *kubeone.KubeOneCluster, out *KubeOneCluster, s conversion.Scope) error { out.Name = in.Name if err := Convert_kubeone_ControlPlaneConfig_To_v1beta2_ControlPlaneConfig(&in.ControlPlane, &out.ControlPlane, s); err != nil { @@ -1415,9 +1382,7 @@ func autoConvert_kubeone_KubeOneCluster_To_v1beta2_KubeOneCluster(in *kubeone.Ku out.SystemPackages = (*SystemPackages)(unsafe.Pointer(in.SystemPackages)) // WARNING: in.AssetConfiguration requires manual conversion: does not exist in peer-type out.RegistryConfiguration = (*RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - if err := Convert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration(&in.KubeletConfiguration, &out.KubeletConfiguration, s); err != nil { - return err - } + // WARNING: in.LoggingConfig requires manual conversion: does not exist in peer-type return nil } @@ -1469,26 +1434,6 @@ func Convert_kubeone_KubeletConfig_To_v1beta2_KubeletConfig(in *kubeone.KubeletC return autoConvert_kubeone_KubeletConfig_To_v1beta2_KubeletConfig(in, out, s) } -func autoConvert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { - out.ContainerLogMaxSize = in.ContainerLogMaxSize - return nil -} - -// Convert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration is an autogenerated conversion function. -func Convert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration(in *KubeletConfiguration, out *kubeone.KubeletConfiguration, s conversion.Scope) error { - return autoConvert_v1beta2_KubeletConfiguration_To_kubeone_KubeletConfiguration(in, out, s) -} - -func autoConvert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error { - out.ContainerLogMaxSize = in.ContainerLogMaxSize - return nil -} - -// Convert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration is an autogenerated conversion function. -func Convert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration(in *kubeone.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error { - return autoConvert_kubeone_KubeletConfiguration_To_v1beta2_KubeletConfiguration(in, out, s) -} - func autoConvert_v1beta2_MachineControllerConfig_To_kubeone_MachineControllerConfig(in *MachineControllerConfig, out *kubeone.MachineControllerConfig, s conversion.Scope) error { out.Deploy = in.Deploy return nil @@ -1547,24 +1492,6 @@ func Convert_kubeone_NoneSpec_To_v1beta2_NoneSpec(in *kubeone.NoneSpec, out *Non return autoConvert_kubeone_NoneSpec_To_v1beta2_NoneSpec(in, out, s) } -func autoConvert_v1beta2_NutanixSpec_To_kubeone_NutanixSpec(in *NutanixSpec, out *kubeone.NutanixSpec, s conversion.Scope) error { - return nil -} - -// Convert_v1beta2_NutanixSpec_To_kubeone_NutanixSpec is an autogenerated conversion function. -func Convert_v1beta2_NutanixSpec_To_kubeone_NutanixSpec(in *NutanixSpec, out *kubeone.NutanixSpec, s conversion.Scope) error { - return autoConvert_v1beta2_NutanixSpec_To_kubeone_NutanixSpec(in, out, s) -} - -func autoConvert_kubeone_NutanixSpec_To_v1beta2_NutanixSpec(in *kubeone.NutanixSpec, out *NutanixSpec, s conversion.Scope) error { - return nil -} - -// Convert_kubeone_NutanixSpec_To_v1beta2_NutanixSpec is an autogenerated conversion function. -func Convert_kubeone_NutanixSpec_To_v1beta2_NutanixSpec(in *kubeone.NutanixSpec, out *NutanixSpec, s conversion.Scope) error { - return autoConvert_kubeone_NutanixSpec_To_v1beta2_NutanixSpec(in, out, s) -} - func autoConvert_v1beta2_OpenIDConnect_To_kubeone_OpenIDConnect(in *OpenIDConnect, out *kubeone.OpenIDConnect, s conversion.Scope) error { out.Enable = in.Enable if err := Convert_v1beta2_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(&in.Config, &out.Config, s); err != nil { diff --git a/pkg/apis/kubeone/zz_generated.deepcopy.go b/pkg/apis/kubeone/zz_generated.deepcopy.go index 5a180d85f..87c136daf 100644 --- a/pkg/apis/kubeone/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/zz_generated.deepcopy.go @@ -270,11 +270,6 @@ func (in *CloudProviderSpec) DeepCopyInto(out *CloudProviderSpec) { *out = new(HetznerSpec) **out = **in } - if in.Nutanix != nil { - in, out := &in.Nutanix, &out.Nutanix - *out = new(NutanixSpec) - **out = **in - } if in.Openstack != nil { in, out := &in.Openstack, &out.Openstack *out = new(OpenstackSpec) @@ -796,7 +791,7 @@ func (in *KubeOneCluster) DeepCopyInto(out *KubeOneCluster) { *out = new(RegistryConfiguration) **out = **in } - out.KubeletConfiguration = in.KubeletConfiguration + out.LoggingConfig = in.LoggingConfig return } @@ -882,17 +877,17 @@ func (in *KubeletConfig) DeepCopy() *KubeletConfig { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { +func (in *LoggingConfig) DeepCopyInto(out *LoggingConfig) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfiguration. -func (in *KubeletConfiguration) DeepCopy() *KubeletConfiguration { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingConfig. +func (in *LoggingConfig) DeepCopy() *LoggingConfig { if in == nil { return nil } - out := new(KubeletConfiguration) + out := new(LoggingConfig) in.DeepCopyInto(out) return out } @@ -945,22 +940,6 @@ func (in *NoneSpec) DeepCopy() *NoneSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixSpec) DeepCopyInto(out *NutanixSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixSpec. -func (in *NutanixSpec) DeepCopy() *NutanixSpec { - if in == nil { - return nil - } - out := new(NutanixSpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenIDConnect) DeepCopyInto(out *OpenIDConnect) { *out = *in diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index 308340f63..d2635392c 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -48,9 +48,8 @@ const ( type printOpts struct { FullConfig bool `longflag:"full" shortflag:"f"` - ClusterName string `longflag:"cluster-name" shortflag:"n"` - KubernetesVersion string `longflag:"kubernetes-version" shortflag:"k"` - ContainerLogMaxSize string `longflag:"container-log-max-size"` + ClusterName string `longflag:"cluster-name" shortflag:"n"` + KubernetesVersion string `longflag:"kubernetes-version" shortflag:"k"` CloudProviderName string `longflag:"provider" shortflag:"p"` CloudProviderExternal bool @@ -80,6 +79,8 @@ type printOpts struct { EnableEncryptionProviders bool `longflag:"enable-encryption-providers"` DeployMachineController bool `longflag:"deploy-machine-controller"` + + ContainerLogMaxSize string `longflag:"container-log-max-size"` } // configCmd setups the config command @@ -137,13 +138,6 @@ func configPrintCmd() *cobra.Command { defaultKubernetesVersion, "Kubernetes version") - cmd.Flags().StringVarP( - &opts.ContainerLogMaxSize, - longFlagName(opts, "ContainerLogMaxSize"), - shortFlagName(opts, "ContainerLogMaxSize"), - "100Mi", - "ContainerLogMaxSize") - cmd.Flags().StringVarP( &opts.CloudProviderName, longFlagName(opts, "CloudProviderName"), @@ -182,6 +176,14 @@ func configPrintCmd() *cobra.Command { // MachineController cmd.Flags().BoolVar(&opts.DeployMachineController, longFlagName(opts, "DeployMachineController"), true, "deploy kubermatic machine-controller") + // LoggingConfig + cmd.Flags().StringVarP( + &opts.ContainerLogMaxSize, + longFlagName(opts, "ContainerLogMaxSize"), + shortFlagName(opts, "ContainerLogMaxSize"), + "100Mi", + "ContainerLogMaxSize") + return cmd } @@ -297,8 +299,6 @@ func createAndPrintManifest(printOptions *printOpts) error { // Version cfg.Set(yamled.Path{"versions", "kubernetes"}, printOptions.KubernetesVersion) - cfg.Set(yamled.Path{"kubeletConfiguration", "ContainerLogMaxSize"}, printOptions.ContainerLogMaxSize) - // Provider var providerVal struct{} switch printOptions.CloudProviderName { @@ -380,6 +380,8 @@ func createAndPrintManifest(printOptions *printOpts) error { cfg.Set(yamled.Path{"machineController", "deploy"}, printOptions.DeployMachineController) } + cfg.Set(yamled.Path{"loggingConfig", "ContainerLogMaxSize"}, printOptions.ContainerLogMaxSize) + // Print the manifest err := validateAndPrintConfig(cfg) if err != nil { @@ -512,8 +514,6 @@ name: {{ .ClusterName }} versions: kubernetes: "{{ .KubernetesVersion }}" -kubeletConfiguration: - containerLogMaxSize: "{{ .ContainerLogMaxSize }}" clusterNetwork: # the subnet used for pods (default: 10.244.0.0/16) @@ -978,4 +978,7 @@ machineController: # operatingSystem: 'ubuntu' # operatingSystemSpec: # distUpgradeOnBoot: true + +loggingConfig: + containerLogMaxSize: "{{ .ContainerLogMaxSize }}" ` diff --git a/pkg/templates/kubeadm/v1beta2/kubeadm.go b/pkg/templates/kubeadm/v1beta2/kubeadm.go index b8f875cb9..9c1c9497e 100644 --- a/pkg/templates/kubeadm/v1beta2/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta2/kubeadm.go @@ -170,7 +170,7 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), + ContainerLogMaxSize: cluster.LoggingConfig.ContainerLogMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -362,7 +362,7 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), + ContainerLogMaxSize: cluster.LoggingConfig.ContainerLogMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -470,11 +470,3 @@ func kubeProxyConfiguration(s *state.State) *kubeproxyv1alpha1.KubeProxyConfigur return kubeProxyConfig } - -func getContainerLogMaxSize(value string) string { - if value == "" { - return "100Mi" - } - - return value -} diff --git a/pkg/templates/kubeadm/v1beta3/kubeadm.go b/pkg/templates/kubeadm/v1beta3/kubeadm.go index 11d5347bd..b8824c408 100644 --- a/pkg/templates/kubeadm/v1beta3/kubeadm.go +++ b/pkg/templates/kubeadm/v1beta3/kubeadm.go @@ -170,7 +170,7 @@ func NewConfig(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Object, er ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), + ContainerLogMaxSize: cluster.LoggingConfig.ContainerLogMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -362,7 +362,7 @@ func NewConfigWorker(s *state.State, host kubeoneapi.HostConfig) ([]runtime.Obje ReadOnlyPort: 0, RotateCertificates: true, ClusterDNS: []string{resources.NodeLocalDNSVirtualIP}, - ContainerLogMaxSize: getContainerLogMaxSize(cluster.KubeletConfiguration.ContainerLogMaxSize), + ContainerLogMaxSize: cluster.LoggingConfig.ContainerLogMaxSize, Authentication: kubeletconfigv1beta1.KubeletAuthentication{ Anonymous: kubeletconfigv1beta1.KubeletAnonymousAuthentication{ Enabled: &bfalse, @@ -470,11 +470,3 @@ func kubeProxyConfiguration(s *state.State) *kubeproxyv1alpha1.KubeProxyConfigur return kubeProxyConfig } - -func getContainerLogMaxSize(value string) string { - if value == "" { - return "100Mi" - } - - return value -} From 871a09129c62fc4e4b5aab1f71b916fe049754c0 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Mon, 24 Jan 2022 17:43:46 +0400 Subject: [PATCH 20/40] chore: update kubeone api --- pkg/apis/kubeone/types.go | 5 ++ pkg/apis/kubeone/v1beta1/conversion.go | 4 - .../v1beta1/zz_generated.conversion.go | 1 + pkg/apis/kubeone/v1beta2/types.go | 10 +-- .../v1beta2/zz_generated.conversion.go | 79 ++++++++++++++++++- .../kubeone/v1beta2/zz_generated.deepcopy.go | 10 +-- pkg/apis/kubeone/zz_generated.deepcopy.go | 21 +++++ 7 files changed, 113 insertions(+), 17 deletions(-) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index dec074e50..69c44c137 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -233,6 +233,8 @@ type CloudProviderSpec struct { GCE *GCESpec `json:"gce,omitempty"` // Hetzner Hetzner *HetznerSpec `json:"hetzner,omitempty"` + // Nutanix + Nutanix *NutanixSpec `json:"nutanix,omitempty"` // Openstack Openstack *OpenstackSpec `json:"openstack,omitempty"` // EquinixMetal @@ -261,6 +263,9 @@ type HetznerSpec struct { NetworkID string `json:"networkID,omitempty"` } +// NutanixSpec defines the Nutanix provider +type NutanixSpec struct{} + // OpenstackSpec defines the Openstack provider type OpenstackSpec struct{} diff --git a/pkg/apis/kubeone/v1beta1/conversion.go b/pkg/apis/kubeone/v1beta1/conversion.go index a41a4b96c..b37723e90 100644 --- a/pkg/apis/kubeone/v1beta1/conversion.go +++ b/pkg/apis/kubeone/v1beta1/conversion.go @@ -69,7 +69,3 @@ func Convert_kubeone_HostConfig_To_v1beta1_HostConfig(in *kubeone.HostConfig, ou // explicitly skip kubelet conversion omitted in autoConvert_kubeone_HostConfig_To_v1beta1_HostConfig return autoConvert_kubeone_HostConfig_To_v1beta1_HostConfig(in, out, scope) } -func Convert_kubeone_LoggingConfig_To_v1beta1_LoggingConfig(in *kubeone.LoggingConfig, out *kubeone.LoggingConfig, scope conversion.Scope) error { - // skip conversion - return nil -} diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go index e0859c869..a0f063429 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go @@ -840,6 +840,7 @@ func autoConvert_kubeone_CloudProviderSpec_To_v1beta1_CloudProviderSpec(in *kube out.DigitalOcean = (*DigitalOceanSpec)(unsafe.Pointer(in.DigitalOcean)) out.GCE = (*GCESpec)(unsafe.Pointer(in.GCE)) out.Hetzner = (*HetznerSpec)(unsafe.Pointer(in.Hetzner)) + // WARNING: in.Nutanix requires manual conversion: does not exist in peer-type out.Openstack = (*OpenstackSpec)(unsafe.Pointer(in.Openstack)) // WARNING: in.EquinixMetal requires manual conversion: does not exist in peer-type out.Vsphere = (*VsphereSpec)(unsafe.Pointer(in.Vsphere)) diff --git a/pkg/apis/kubeone/v1beta2/types.go b/pkg/apis/kubeone/v1beta2/types.go index 913c839ee..fdc2f1d83 100644 --- a/pkg/apis/kubeone/v1beta2/types.go +++ b/pkg/apis/kubeone/v1beta2/types.go @@ -61,13 +61,13 @@ type KubeOneCluster struct { SystemPackages *SystemPackages `json:"systemPackages,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` - // KubeletConfiguration configures the kubelet - KubeletConfiguration KubeletConfiguration `json:"kubeletConfiguration"` + // LoggingConfig configures the Kubelet's log configuration + LoggingConfig LoggingConfig `json:"loggingConfig,omitempty"` } -// KubeletConfiguration -type KubeletConfiguration struct { - // ContainerLogsMaxSize configure --container-logs-max-size command-line flag of the kubelet. Defaults to 100Mi. +// LoggingConfig +type LoggingConfig struct { + // ContainerLogMaxSize configures the maximum size of container log file before it is rotated // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` } diff --git a/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go index da2898ba0..5bc2751bd 100644 --- a/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta2/zz_generated.conversion.go @@ -383,6 +383,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*LoggingConfig)(nil), (*kubeone.LoggingConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_LoggingConfig_To_kubeone_LoggingConfig(a.(*LoggingConfig), b.(*kubeone.LoggingConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.LoggingConfig)(nil), (*LoggingConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_LoggingConfig_To_v1beta2_LoggingConfig(a.(*kubeone.LoggingConfig), b.(*LoggingConfig), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*MachineControllerConfig)(nil), (*kubeone.MachineControllerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta2_MachineControllerConfig_To_kubeone_MachineControllerConfig(a.(*MachineControllerConfig), b.(*kubeone.MachineControllerConfig), scope) }); err != nil { @@ -413,6 +423,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*NutanixSpec)(nil), (*kubeone.NutanixSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_NutanixSpec_To_kubeone_NutanixSpec(a.(*NutanixSpec), b.(*kubeone.NutanixSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kubeone.NutanixSpec)(nil), (*NutanixSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_NutanixSpec_To_v1beta2_NutanixSpec(a.(*kubeone.NutanixSpec), b.(*NutanixSpec), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*OpenIDConnect)(nil), (*kubeone.OpenIDConnect)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta2_OpenIDConnect_To_kubeone_OpenIDConnect(a.(*OpenIDConnect), b.(*kubeone.OpenIDConnect), scope) }); err != nil { @@ -798,7 +818,7 @@ func autoConvert_v1beta2_CloudProviderSpec_To_kubeone_CloudProviderSpec(in *Clou out.DigitalOcean = (*kubeone.DigitalOceanSpec)(unsafe.Pointer(in.DigitalOcean)) out.GCE = (*kubeone.GCESpec)(unsafe.Pointer(in.GCE)) out.Hetzner = (*kubeone.HetznerSpec)(unsafe.Pointer(in.Hetzner)) - // WARNING: in.Nutanix requires manual conversion: does not exist in peer-type + out.Nutanix = (*kubeone.NutanixSpec)(unsafe.Pointer(in.Nutanix)) out.Openstack = (*kubeone.OpenstackSpec)(unsafe.Pointer(in.Openstack)) out.EquinixMetal = (*kubeone.EquinixMetalSpec)(unsafe.Pointer(in.EquinixMetal)) out.Vsphere = (*kubeone.VsphereSpec)(unsafe.Pointer(in.Vsphere)) @@ -806,6 +826,11 @@ func autoConvert_v1beta2_CloudProviderSpec_To_kubeone_CloudProviderSpec(in *Clou return nil } +// Convert_v1beta2_CloudProviderSpec_To_kubeone_CloudProviderSpec is an autogenerated conversion function. +func Convert_v1beta2_CloudProviderSpec_To_kubeone_CloudProviderSpec(in *CloudProviderSpec, out *kubeone.CloudProviderSpec, s conversion.Scope) error { + return autoConvert_v1beta2_CloudProviderSpec_To_kubeone_CloudProviderSpec(in, out, s) +} + func autoConvert_kubeone_CloudProviderSpec_To_v1beta2_CloudProviderSpec(in *kubeone.CloudProviderSpec, out *CloudProviderSpec, s conversion.Scope) error { out.External = in.External out.CloudConfig = in.CloudConfig @@ -815,6 +840,7 @@ func autoConvert_kubeone_CloudProviderSpec_To_v1beta2_CloudProviderSpec(in *kube out.DigitalOcean = (*DigitalOceanSpec)(unsafe.Pointer(in.DigitalOcean)) out.GCE = (*GCESpec)(unsafe.Pointer(in.GCE)) out.Hetzner = (*HetznerSpec)(unsafe.Pointer(in.Hetzner)) + out.Nutanix = (*NutanixSpec)(unsafe.Pointer(in.Nutanix)) out.Openstack = (*OpenstackSpec)(unsafe.Pointer(in.Openstack)) out.EquinixMetal = (*EquinixMetalSpec)(unsafe.Pointer(in.EquinixMetal)) out.Vsphere = (*VsphereSpec)(unsafe.Pointer(in.Vsphere)) @@ -1380,10 +1406,17 @@ func autoConvert_v1beta2_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneClu out.Addons = (*kubeone.Addons)(unsafe.Pointer(in.Addons)) out.SystemPackages = (*kubeone.SystemPackages)(unsafe.Pointer(in.SystemPackages)) out.RegistryConfiguration = (*kubeone.RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - // WARNING: in.KubeletConfiguration requires manual conversion: does not exist in peer-type + if err := Convert_v1beta2_LoggingConfig_To_kubeone_LoggingConfig(&in.LoggingConfig, &out.LoggingConfig, s); err != nil { + return err + } return nil } +// Convert_v1beta2_KubeOneCluster_To_kubeone_KubeOneCluster is an autogenerated conversion function. +func Convert_v1beta2_KubeOneCluster_To_kubeone_KubeOneCluster(in *KubeOneCluster, out *kubeone.KubeOneCluster, s conversion.Scope) error { + return autoConvert_v1beta2_KubeOneCluster_To_kubeone_KubeOneCluster(in, out, s) +} + func autoConvert_kubeone_KubeOneCluster_To_v1beta2_KubeOneCluster(in *kubeone.KubeOneCluster, out *KubeOneCluster, s conversion.Scope) error { out.Name = in.Name if err := Convert_kubeone_ControlPlaneConfig_To_v1beta2_ControlPlaneConfig(&in.ControlPlane, &out.ControlPlane, s); err != nil { @@ -1420,7 +1453,9 @@ func autoConvert_kubeone_KubeOneCluster_To_v1beta2_KubeOneCluster(in *kubeone.Ku out.SystemPackages = (*SystemPackages)(unsafe.Pointer(in.SystemPackages)) // WARNING: in.AssetConfiguration requires manual conversion: does not exist in peer-type out.RegistryConfiguration = (*RegistryConfiguration)(unsafe.Pointer(in.RegistryConfiguration)) - // WARNING: in.LoggingConfig requires manual conversion: does not exist in peer-type + if err := Convert_kubeone_LoggingConfig_To_v1beta2_LoggingConfig(&in.LoggingConfig, &out.LoggingConfig, s); err != nil { + return err + } return nil } @@ -1472,6 +1507,26 @@ func Convert_kubeone_KubeletConfig_To_v1beta2_KubeletConfig(in *kubeone.KubeletC return autoConvert_kubeone_KubeletConfig_To_v1beta2_KubeletConfig(in, out, s) } +func autoConvert_v1beta2_LoggingConfig_To_kubeone_LoggingConfig(in *LoggingConfig, out *kubeone.LoggingConfig, s conversion.Scope) error { + out.ContainerLogMaxSize = in.ContainerLogMaxSize + return nil +} + +// Convert_v1beta2_LoggingConfig_To_kubeone_LoggingConfig is an autogenerated conversion function. +func Convert_v1beta2_LoggingConfig_To_kubeone_LoggingConfig(in *LoggingConfig, out *kubeone.LoggingConfig, s conversion.Scope) error { + return autoConvert_v1beta2_LoggingConfig_To_kubeone_LoggingConfig(in, out, s) +} + +func autoConvert_kubeone_LoggingConfig_To_v1beta2_LoggingConfig(in *kubeone.LoggingConfig, out *LoggingConfig, s conversion.Scope) error { + out.ContainerLogMaxSize = in.ContainerLogMaxSize + return nil +} + +// Convert_kubeone_LoggingConfig_To_v1beta2_LoggingConfig is an autogenerated conversion function. +func Convert_kubeone_LoggingConfig_To_v1beta2_LoggingConfig(in *kubeone.LoggingConfig, out *LoggingConfig, s conversion.Scope) error { + return autoConvert_kubeone_LoggingConfig_To_v1beta2_LoggingConfig(in, out, s) +} + func autoConvert_v1beta2_MachineControllerConfig_To_kubeone_MachineControllerConfig(in *MachineControllerConfig, out *kubeone.MachineControllerConfig, s conversion.Scope) error { out.Deploy = in.Deploy return nil @@ -1530,6 +1585,24 @@ func Convert_kubeone_NoneSpec_To_v1beta2_NoneSpec(in *kubeone.NoneSpec, out *Non return autoConvert_kubeone_NoneSpec_To_v1beta2_NoneSpec(in, out, s) } +func autoConvert_v1beta2_NutanixSpec_To_kubeone_NutanixSpec(in *NutanixSpec, out *kubeone.NutanixSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1beta2_NutanixSpec_To_kubeone_NutanixSpec is an autogenerated conversion function. +func Convert_v1beta2_NutanixSpec_To_kubeone_NutanixSpec(in *NutanixSpec, out *kubeone.NutanixSpec, s conversion.Scope) error { + return autoConvert_v1beta2_NutanixSpec_To_kubeone_NutanixSpec(in, out, s) +} + +func autoConvert_kubeone_NutanixSpec_To_v1beta2_NutanixSpec(in *kubeone.NutanixSpec, out *NutanixSpec, s conversion.Scope) error { + return nil +} + +// Convert_kubeone_NutanixSpec_To_v1beta2_NutanixSpec is an autogenerated conversion function. +func Convert_kubeone_NutanixSpec_To_v1beta2_NutanixSpec(in *kubeone.NutanixSpec, out *NutanixSpec, s conversion.Scope) error { + return autoConvert_kubeone_NutanixSpec_To_v1beta2_NutanixSpec(in, out, s) +} + func autoConvert_v1beta2_OpenIDConnect_To_kubeone_OpenIDConnect(in *OpenIDConnect, out *kubeone.OpenIDConnect, s conversion.Scope) error { out.Enable = in.Enable if err := Convert_v1beta2_OpenIDConnectConfig_To_kubeone_OpenIDConnectConfig(&in.Config, &out.Config, s); err != nil { diff --git a/pkg/apis/kubeone/v1beta2/zz_generated.deepcopy.go b/pkg/apis/kubeone/v1beta2/zz_generated.deepcopy.go index 0db4f6402..ad71cba3b 100644 --- a/pkg/apis/kubeone/v1beta2/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/v1beta2/zz_generated.deepcopy.go @@ -792,7 +792,7 @@ func (in *KubeOneCluster) DeepCopyInto(out *KubeOneCluster) { *out = new(RegistryConfiguration) **out = **in } - out.KubeletConfiguration = in.KubeletConfiguration + out.LoggingConfig = in.LoggingConfig return } @@ -878,17 +878,17 @@ func (in *KubeletConfig) DeepCopy() *KubeletConfig { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { +func (in *LoggingConfig) DeepCopyInto(out *LoggingConfig) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfiguration. -func (in *KubeletConfiguration) DeepCopy() *KubeletConfiguration { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingConfig. +func (in *LoggingConfig) DeepCopy() *LoggingConfig { if in == nil { return nil } - out := new(KubeletConfiguration) + out := new(LoggingConfig) in.DeepCopyInto(out) return out } diff --git a/pkg/apis/kubeone/zz_generated.deepcopy.go b/pkg/apis/kubeone/zz_generated.deepcopy.go index f65669f55..9e95d5d9f 100644 --- a/pkg/apis/kubeone/zz_generated.deepcopy.go +++ b/pkg/apis/kubeone/zz_generated.deepcopy.go @@ -270,6 +270,11 @@ func (in *CloudProviderSpec) DeepCopyInto(out *CloudProviderSpec) { *out = new(HetznerSpec) **out = **in } + if in.Nutanix != nil { + in, out := &in.Nutanix, &out.Nutanix + *out = new(NutanixSpec) + **out = **in + } if in.Openstack != nil { in, out := &in.Openstack, &out.Openstack *out = new(OpenstackSpec) @@ -961,6 +966,22 @@ func (in *NoneSpec) DeepCopy() *NoneSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NutanixSpec) DeepCopyInto(out *NutanixSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixSpec. +func (in *NutanixSpec) DeepCopy() *NutanixSpec { + if in == nil { + return nil + } + out := new(NutanixSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenIDConnect) DeepCopyInto(out *OpenIDConnect) { *out = *in From eb70c2449b18f2210c34ca8590a3c5480efdd2f6 Mon Sep 17 00:00:00 2001 From: Artiom Diomin Date: Mon, 24 Jan 2022 15:51:12 +0200 Subject: [PATCH 21/40] Add skip of LoggingConfig{} conversion in v1beta1 API Signed-off-by: Artiom Diomin --- pkg/apis/kubeone/v1beta1/conversion.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/apis/kubeone/v1beta1/conversion.go b/pkg/apis/kubeone/v1beta1/conversion.go index b37723e90..74a104038 100644 --- a/pkg/apis/kubeone/v1beta1/conversion.go +++ b/pkg/apis/kubeone/v1beta1/conversion.go @@ -69,3 +69,8 @@ func Convert_kubeone_HostConfig_To_v1beta1_HostConfig(in *kubeone.HostConfig, ou // explicitly skip kubelet conversion omitted in autoConvert_kubeone_HostConfig_To_v1beta1_HostConfig return autoConvert_kubeone_HostConfig_To_v1beta1_HostConfig(in, out, scope) } + +func Convert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in *kubeone.KubeOneCluster, out *KubeOneCluster, s conversion.Scope) error { + // LoggingConfig was introduced only in new v1beta2 API, so we skip it here + return autoConvert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(in, out, s) +} From 96a34be03752519d9b7d4f950928147b79dcc805 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Tue, 25 Jan 2022 07:38:00 +0400 Subject: [PATCH 22/40] chore: update api defaulting --- docs/api_reference/v1beta1.en.md | 13 +------------ docs/api_reference/v1beta2.en.md | 12 ++++++------ pkg/apis/kubeone/config/config.go | 6 +++--- pkg/apis/kubeone/v1beta1/zz_generated.conversion.go | 10 +++++----- 4 files changed, 15 insertions(+), 26 deletions(-) diff --git a/docs/api_reference/v1beta1.en.md b/docs/api_reference/v1beta1.en.md index d0e2a1694..bef43727c 100644 --- a/docs/api_reference/v1beta1.en.md +++ b/docs/api_reference/v1beta1.en.md @@ -1,6 +1,6 @@ +++ title = "v1beta1 API Reference" -date = 2022-01-07T18:00:12+04:00 +date = 2022-01-25T07:36:12+04:00 weight = 11 +++ ## v1beta1 @@ -36,7 +36,6 @@ weight = 11 * [ImageAsset](#imageasset) * [KubeOneCluster](#kubeonecluster) * [KubeProxyConfig](#kubeproxyconfig) -* [KubeletConfiguration](#kubeletconfiguration) * [MachineControllerConfig](#machinecontrollerconfig) * [MetricsServer](#metricsserver) * [NoneSpec](#nonespec) @@ -433,7 +432,6 @@ KubeOneCluster is KubeOne Cluster API Schema | systemPackages | SystemPackages configure kubeone behaviour regarding OS packages. | *[SystemPackages](#systempackages) | false | | assetConfiguration | AssetConfiguration configures how are binaries and container images downloaded | [AssetConfiguration](#assetconfiguration) | false | | registryConfiguration | RegistryConfiguration configures how Docker images are pulled from an image registry | *[RegistryConfiguration](#registryconfiguration) | false | -| kubeletConfiguration | KubeletConfiguration configures the kubelet | [KubeletConfiguration](#kubeletconfiguration) | false | [Back to Group](#v1beta1) @@ -449,15 +447,6 @@ KubeProxyConfig defines configured kube-proxy mode, default is iptables mode [Back to Group](#v1beta1) -### KubeletConfiguration - -Kubele - -| Field | Description | Scheme | Required | -| ----- | ----------- | ------ | -------- | - -[Back to Group](#v1beta1) - ### MachineControllerConfig MachineControllerConfig configures kubermatic machine-controller deployment diff --git a/docs/api_reference/v1beta2.en.md b/docs/api_reference/v1beta2.en.md index 9933699de..d32256776 100644 --- a/docs/api_reference/v1beta2.en.md +++ b/docs/api_reference/v1beta2.en.md @@ -1,6 +1,6 @@ +++ title = "v1beta2 API Reference" -date = 2022-01-11T11:06:38+02:00 +date = 2022-01-25T07:36:12+04:00 weight = 11 +++ ## v1beta2 @@ -40,7 +40,7 @@ weight = 11 * [KubeOneCluster](#kubeonecluster) * [KubeProxyConfig](#kubeproxyconfig) * [KubeletConfig](#kubeletconfig) -* [KubeletConfiguration](#kubeletconfiguration) +* [LoggingConfig](#loggingconfig) * [MachineControllerConfig](#machinecontrollerconfig) * [MetricsServer](#metricsserver) * [NoneSpec](#nonespec) @@ -461,7 +461,7 @@ KubeOneCluster is KubeOne Cluster API Schema | addons | Addons are used to deploy additional manifests. | *[Addons](#addons) | false | | systemPackages | SystemPackages configure kubeone behaviour regarding OS packages. | *[SystemPackages](#systempackages) | false | | registryConfiguration | RegistryConfiguration configures how Docker images are pulled from an image registry | *[RegistryConfiguration](#registryconfiguration) | false | -| kubeletConfiguration | KubeletConfiguration configures the kubelet | [KubeletConfiguration](#kubeletconfiguration) | true | +| loggingConfig | LoggingConfig configures the Kubelet's log configuration | [LoggingConfig](#loggingconfig) | false | [Back to Group](#v1beta2) @@ -489,13 +489,13 @@ KubeletConfig provides some kubelet configuration options [Back to Group](#v1beta2) -### KubeletConfiguration +### LoggingConfig -KubeletConfiguration +LoggingConfig | Field | Description | Scheme | Required | | ----- | ----------- | ------ | -------- | -| containerLogMaxSize | ContainerLogsMaxSize configure --container-logs-max-size command-line flag of the kubelet. Defaults to 100Mi. See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ | string | false | +| containerLogMaxSize | ContainerLogMaxSize configures the maximum size of container log file before it is rotated See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ | string | false | [Back to Group](#v1beta2) diff --git a/pkg/apis/kubeone/config/config.go b/pkg/apis/kubeone/config/config.go index 6891cfcaf..e693c2aec 100644 --- a/pkg/apis/kubeone/config/config.go +++ b/pkg/apis/kubeone/config/config.go @@ -237,9 +237,9 @@ func SetKubeOneClusterDynamicDefaults(cluster *kubeoneapi.KubeOneCluster, creden } } - // check if the container log max size is set, if not set it to the of 100Mi - if cfg.LoggingConfig.ContainerLogMaxSize == "" { - cfg.LoggingConfig.ContainerLogMaxSize = "100Mi" + // check if the container log max size is not set, if not set it + if cluster.LoggingConfig.ContainerLogMaxSize == "" { + cluster.LoggingConfig.ContainerLogMaxSize = "100Mi" } // Default the AssetsConfiguration internal API diff --git a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go index a0f063429..f05f6c908 100644 --- a/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/kubeone/v1beta1/zz_generated.conversion.go @@ -303,11 +303,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*kubeone.KubeOneCluster)(nil), (*KubeOneCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(a.(*kubeone.KubeOneCluster), b.(*KubeOneCluster), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*KubeProxyConfig)(nil), (*kubeone.KubeProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_KubeProxyConfig_To_kubeone_KubeProxyConfig(a.(*KubeProxyConfig), b.(*kubeone.KubeProxyConfig), scope) }); err != nil { @@ -538,6 +533,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*kubeone.KubeOneCluster)(nil), (*KubeOneCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kubeone_KubeOneCluster_To_v1beta1_KubeOneCluster(a.(*kubeone.KubeOneCluster), b.(*KubeOneCluster), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*CloudProviderSpec)(nil), (*kubeone.CloudProviderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CloudProviderSpec_To_kubeone_CloudProviderSpec(a.(*CloudProviderSpec), b.(*kubeone.CloudProviderSpec), scope) }); err != nil { From 2f4cd2e7414686961e7ad5d41591105b90c4dda9 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Tue, 25 Jan 2022 07:56:12 +0400 Subject: [PATCH 23/40] chore: fix linting issue --- pkg/apis/kubeone/types.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index 69c44c137..a9365492c 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -18,6 +18,7 @@ package kubeone import ( "encoding/json" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) From 9ca7c216e57bf4a1c6941c2c12a551ce05c6197f Mon Sep 17 00:00:00 2001 From: Obinna Odirionye Date: Tue, 25 Jan 2022 23:03:15 +0400 Subject: [PATCH 24/40] Update pkg/apis/kubeone/types.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marko Mudrinić --- pkg/apis/kubeone/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index a9365492c..d5a16aa8e 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -67,7 +67,7 @@ type KubeOneCluster struct { LoggingConfig LoggingConfig `json:"loggingConfig,omitempty"` } -// LoggingConfig +// LoggingConfig configures the Kubelet's log rotation type LoggingConfig struct { // ContainerLogMaxSize configures the maximum size of container log file before it is rotated // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ From 4553a37d7ee7c184d91c362f95dd480754ccb9ff Mon Sep 17 00:00:00 2001 From: Obinna Odirionye Date: Tue, 25 Jan 2022 23:03:30 +0400 Subject: [PATCH 25/40] Update pkg/apis/kubeone/types.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marko Mudrinić --- pkg/apis/kubeone/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apis/kubeone/types.go b/pkg/apis/kubeone/types.go index d5a16aa8e..585a72b3a 100644 --- a/pkg/apis/kubeone/types.go +++ b/pkg/apis/kubeone/types.go @@ -63,7 +63,7 @@ type KubeOneCluster struct { AssetConfiguration AssetConfiguration `json:"assetConfiguration,omitempty"` // RegistryConfiguration configures how Docker images are pulled from an image registry RegistryConfiguration *RegistryConfiguration `json:"registryConfiguration,omitempty"` - // LoggingConfig configures the Kubelet's log configuration + // LoggingConfig configures the Kubelet's log rotation LoggingConfig LoggingConfig `json:"loggingConfig,omitempty"` } From 213feed41cfeafae791b41d8603c91e608aa7868 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 26 Jan 2022 15:29:15 +0400 Subject: [PATCH 26/40] chore: add docker CRI checks --- docs/api_reference/v1beta1.en.md | 2 +- docs/api_reference/v1beta2.en.md | 2 +- pkg/containerruntime/docker_config.go | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/api_reference/v1beta1.en.md b/docs/api_reference/v1beta1.en.md index bef43727c..e6da2b7c2 100644 --- a/docs/api_reference/v1beta1.en.md +++ b/docs/api_reference/v1beta1.en.md @@ -1,6 +1,6 @@ +++ title = "v1beta1 API Reference" -date = 2022-01-25T07:36:12+04:00 +date = 2022-01-26T15:22:37+04:00 weight = 11 +++ ## v1beta1 diff --git a/docs/api_reference/v1beta2.en.md b/docs/api_reference/v1beta2.en.md index d32256776..9d331f2f4 100644 --- a/docs/api_reference/v1beta2.en.md +++ b/docs/api_reference/v1beta2.en.md @@ -1,6 +1,6 @@ +++ title = "v1beta2 API Reference" -date = 2022-01-25T07:36:12+04:00 +date = 2022-01-26T15:22:37+04:00 weight = 11 +++ ## v1beta2 diff --git a/pkg/containerruntime/docker_config.go b/pkg/containerruntime/docker_config.go index 539f60d22..aa92b71dc 100644 --- a/pkg/containerruntime/docker_config.go +++ b/pkg/containerruntime/docker_config.go @@ -18,6 +18,7 @@ package containerruntime import ( "encoding/json" + "strings" "k8c.io/kubeone/pkg/apis/kubeone" ) @@ -32,12 +33,17 @@ type dockerConfig struct { } func marshalDockerConfig(cluster *kubeone.KubeOneCluster) (string, error) { + logSize := strings.ToLower(cluster.LoggingConfig.ContainerLogMaxSize) + logSize = strings.Replace(logSize, "ki", "k", -1) + logSize = strings.Replace(logSize, "mi", "m", -1) + logSize = strings.Replace(logSize, "gi", "g", -1) + cfg := dockerConfig{ ExecOpts: []string{"native.cgroupdriver=systemd"}, StorageDriver: "overlay2", LogDriver: "json-file", LogOpts: map[string]string{ - "max-size": "100m", + "max-size": logSize, }, } From 67932d1ee73b50dbf8f015ce972fe8b3385e8daf Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 26 Jan 2022 16:00:29 +0400 Subject: [PATCH 27/40] chore: fix linting issue --- pkg/containerruntime/docker_config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/containerruntime/docker_config.go b/pkg/containerruntime/docker_config.go index aa92b71dc..127995997 100644 --- a/pkg/containerruntime/docker_config.go +++ b/pkg/containerruntime/docker_config.go @@ -34,9 +34,9 @@ type dockerConfig struct { func marshalDockerConfig(cluster *kubeone.KubeOneCluster) (string, error) { logSize := strings.ToLower(cluster.LoggingConfig.ContainerLogMaxSize) - logSize = strings.Replace(logSize, "ki", "k", -1) - logSize = strings.Replace(logSize, "mi", "m", -1) - logSize = strings.Replace(logSize, "gi", "g", -1) + logSize = strings.ReplaceAll(logSize, "ki", "k") + logSize = strings.ReplaceAll(logSize, "mi", "m") + logSize = strings.ReplaceAll(logSize, "gi", "g") cfg := dockerConfig{ ExecOpts: []string{"native.cgroupdriver=systemd"}, From f1bb451dbe3c946e746a195915d2d06e31d753ac Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 26 Jan 2022 16:11:16 +0400 Subject: [PATCH 28/40] test: update go tests --- pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden | 2 +- .../testdata/TestKubeadmAmazonLinux-overwrite_registry.golden | 2 +- .../TestKubeadmAmazonLinux-overwrite_registry_insecure.golden | 2 +- pkg/scripts/testdata/TestKubeadmAmazonLinux-proxy.golden | 2 +- pkg/scripts/testdata/TestKubeadmAmazonLinux-simple.golden | 2 +- pkg/scripts/testdata/TestKubeadmAmazonLinux-v1.16.1.golden | 2 +- pkg/scripts/testdata/TestKubeadmCentOS-force.golden | 2 +- .../testdata/TestKubeadmCentOS-overwrite_registry.golden | 2 +- .../TestKubeadmCentOS-overwrite_registry_insecure.golden | 2 +- pkg/scripts/testdata/TestKubeadmCentOS-proxy.golden | 2 +- pkg/scripts/testdata/TestKubeadmCentOS-simple.golden | 2 +- pkg/scripts/testdata/TestKubeadmCentOS-v1.16.1.golden | 2 +- .../testdata/TestKubeadmDebian-overwrite_registry.golden | 2 +- .../TestKubeadmDebian-overwrite_registry_insecure.golden | 2 +- pkg/scripts/testdata/TestKubeadmDebian-simple.golden | 2 +- pkg/scripts/testdata/TestKubeadmFlatcar-force.golden | 2 +- .../testdata/TestKubeadmFlatcar-overwrite_registry.golden | 2 +- .../TestKubeadmFlatcar-overwrite_registry_insecure.golden | 2 +- pkg/scripts/testdata/TestKubeadmFlatcar-simple.golden | 2 +- pkg/scripts/testdata/TestUpgradeKubeadmAndCNIAmazonLinux.golden | 2 +- pkg/scripts/testdata/TestUpgradeKubeadmAndCNICentOS.golden | 2 +- pkg/scripts/testdata/TestUpgradeKubeadmAndCNIDebian.golden | 2 +- .../testdata/TestUpgradeKubeletAndKubectlAmazonLinux.golden | 2 +- pkg/scripts/testdata/TestUpgradeKubeletAndKubectlCentOS.golden | 2 +- pkg/scripts/testdata/TestUpgradeKubeletAndKubectlDebian.golden | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden b/pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden index 7563ccc62..551ab5855 100644 --- a/pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden +++ b/pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden @@ -88,7 +88,7 @@ cat < Date: Wed, 26 Jan 2022 17:40:27 +0400 Subject: [PATCH 29/40] Update pkg/cmd/config.go Co-authored-by: Artiom Diomin --- pkg/cmd/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index c7dd24add..ab1809746 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -986,5 +986,5 @@ machineController: # distUpgradeOnBoot: true loggingConfig: - containerLogMaxSize: "{{ .ContainerLogMaxSize }}" + containerLogMaxSize: "{{ .ContainerLogMaxSize }}" ` From 8979029ca68f11ef7a94b99351560845f8e67ddd Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 26 Jan 2022 17:53:54 +0400 Subject: [PATCH 30/40] chore: update values --- pkg/containerruntime/docker_config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/containerruntime/docker_config.go b/pkg/containerruntime/docker_config.go index 127995997..75484f97a 100644 --- a/pkg/containerruntime/docker_config.go +++ b/pkg/containerruntime/docker_config.go @@ -34,9 +34,9 @@ type dockerConfig struct { func marshalDockerConfig(cluster *kubeone.KubeOneCluster) (string, error) { logSize := strings.ToLower(cluster.LoggingConfig.ContainerLogMaxSize) - logSize = strings.ReplaceAll(logSize, "ki", "k") - logSize = strings.ReplaceAll(logSize, "mi", "m") - logSize = strings.ReplaceAll(logSize, "gi", "g") + logSize = strings.ReplaceAll(logSize, "Ki", "k") + logSize = strings.ReplaceAll(logSize, "Mi", "m") + logSize = strings.ReplaceAll(logSize, "Gi", "g") cfg := dockerConfig{ ExecOpts: []string{"native.cgroupdriver=systemd"}, From 8f3dee699abe213d4fc5faf70685172be4eb4341 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Wed, 26 Jan 2022 18:49:49 +0400 Subject: [PATCH 31/40] chore: update values --- pkg/containerruntime/docker_config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/containerruntime/docker_config.go b/pkg/containerruntime/docker_config.go index 75484f97a..127995997 100644 --- a/pkg/containerruntime/docker_config.go +++ b/pkg/containerruntime/docker_config.go @@ -34,9 +34,9 @@ type dockerConfig struct { func marshalDockerConfig(cluster *kubeone.KubeOneCluster) (string, error) { logSize := strings.ToLower(cluster.LoggingConfig.ContainerLogMaxSize) - logSize = strings.ReplaceAll(logSize, "Ki", "k") - logSize = strings.ReplaceAll(logSize, "Mi", "m") - logSize = strings.ReplaceAll(logSize, "Gi", "g") + logSize = strings.ReplaceAll(logSize, "ki", "k") + logSize = strings.ReplaceAll(logSize, "mi", "m") + logSize = strings.ReplaceAll(logSize, "gi", "g") cfg := dockerConfig{ ExecOpts: []string{"native.cgroupdriver=systemd"}, From 2340768b0afdbcd0f224a7d409c2e9e666bd9041 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Thu, 27 Jan 2022 03:37:41 +0400 Subject: [PATCH 32/40] test: add test to check if log size parses --- pkg/containerruntime/docker_config_test.go | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 pkg/containerruntime/docker_config_test.go diff --git a/pkg/containerruntime/docker_config_test.go b/pkg/containerruntime/docker_config_test.go new file mode 100644 index 000000000..de37bc1bf --- /dev/null +++ b/pkg/containerruntime/docker_config_test.go @@ -0,0 +1,56 @@ +package containerruntime + +import ( + "encoding/json" + "k8c.io/kubeone/pkg/apis/kubeone" + "testing" +) + +func Test_marshalDockerConfig(t *testing.T) { + tests := []struct { + name string + cluster *kubeone.KubeOneCluster + want string + }{ + { + name: "Should be convert 100Mi to 100m", + cluster: genCluster(withContainerLogMaxSize("100Mi")), + want: "100m", + }, + { + name: "Should be convert 100Ki to 100k", + cluster: genCluster(withContainerLogMaxSize("100Ki")), + want: "100k", + }, + { + name: "Should be convert 100Gi to 100g", + cluster: genCluster(withContainerLogMaxSize("100Gi")), + want: "100g", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := marshalDockerConfig(tt.cluster) + if err != nil { + t.Errorf("marshalDockerConfig() error = %v,", err) + return + } + cfg := dockerConfig{} + err = json.Unmarshal([]byte(got), &cfg) + gotLogSize := cfg.LogOpts["max-size"] + + if err != nil { + return + } + if gotLogSize != tt.want { + t.Errorf("marshalDockerConfig() got = %v, want %v", got, tt.want) + } + }) + } +} + +func withContainerLogMaxSize(logSize string) clusterOpts { + return func(cls *kubeone.KubeOneCluster) { + cls.LoggingConfig.ContainerLogMaxSize = logSize + } +} From a7666d1958ac18967b8b3e55fb03390b69c92dca Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Thu, 27 Jan 2022 03:42:46 +0400 Subject: [PATCH 33/40] chore: fix lint issue Signed-off-by: nerdeveloper --- pkg/containerruntime/docker_config_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/containerruntime/docker_config_test.go b/pkg/containerruntime/docker_config_test.go index de37bc1bf..b217d9195 100644 --- a/pkg/containerruntime/docker_config_test.go +++ b/pkg/containerruntime/docker_config_test.go @@ -2,8 +2,9 @@ package containerruntime import ( "encoding/json" - "k8c.io/kubeone/pkg/apis/kubeone" "testing" + + "k8c.io/kubeone/pkg/apis/kubeone" ) func Test_marshalDockerConfig(t *testing.T) { From b0963e3af140793395b3d1cb08ea0646ef5eb3a3 Mon Sep 17 00:00:00 2001 From: Obinna Odirionye Date: Fri, 28 Jan 2022 02:00:56 +0400 Subject: [PATCH 34/40] Update pkg/apis/kubeone/v1beta2/types.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marko Mudrinić --- pkg/apis/kubeone/v1beta2/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apis/kubeone/v1beta2/types.go b/pkg/apis/kubeone/v1beta2/types.go index fdc2f1d83..22f7127f6 100644 --- a/pkg/apis/kubeone/v1beta2/types.go +++ b/pkg/apis/kubeone/v1beta2/types.go @@ -65,7 +65,7 @@ type KubeOneCluster struct { LoggingConfig LoggingConfig `json:"loggingConfig,omitempty"` } -// LoggingConfig +// LoggingConfig configures the Kubelet's log rotation type LoggingConfig struct { // ContainerLogMaxSize configures the maximum size of container log file before it is rotated // See more at: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ From 430c5e0a74bc4eb74728412f226df6a999cb0ceb Mon Sep 17 00:00:00 2001 From: Obinna Odirionye Date: Fri, 28 Jan 2022 02:01:18 +0400 Subject: [PATCH 35/40] Update pkg/apis/kubeone/config/config.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marko Mudrinić --- pkg/apis/kubeone/config/config.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/apis/kubeone/config/config.go b/pkg/apis/kubeone/config/config.go index e693c2aec..51e0b3d59 100644 --- a/pkg/apis/kubeone/config/config.go +++ b/pkg/apis/kubeone/config/config.go @@ -237,7 +237,12 @@ func SetKubeOneClusterDynamicDefaults(cluster *kubeoneapi.KubeOneCluster, creden } } - // check if the container log max size is not set, if not set it + // Default ContainerLogMaxSize. + // NB: We intentionally default here because LoggingConfig is not available in + // the v1beta1 API. If we would default in the v1beta2 API instead, this value would + // be empty when converting from v1beta1 to internal. This means that v1beta1 API + // users would depend on default values provided by Docker/upstream, which are + // different than our default values, so we want to avoid this. if cluster.LoggingConfig.ContainerLogMaxSize == "" { cluster.LoggingConfig.ContainerLogMaxSize = "100Mi" } From c0ecbb0d578520956fdee0d1b1e2b06f038058d3 Mon Sep 17 00:00:00 2001 From: Obinna Odirionye Date: Fri, 28 Jan 2022 02:01:30 +0400 Subject: [PATCH 36/40] Update pkg/cmd/config.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marko Mudrinić --- pkg/cmd/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index ab1809746..5458e454c 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -380,7 +380,7 @@ func createAndPrintManifest(printOptions *printOpts) error { cfg.Set(yamled.Path{"machineController", "deploy"}, printOptions.DeployMachineController) } - cfg.Set(yamled.Path{"loggingConfig", "ContainerLogMaxSize"}, printOptions.ContainerLogMaxSize) + cfg.Set(yamled.Path{"loggingConfig", "containerLogMaxSize"}, printOptions.ContainerLogMaxSize) // Print the manifest err := validateAndPrintConfig(cfg) From f24d3ad5a3c9c8288d6a32a29ddf445bb7baa48c Mon Sep 17 00:00:00 2001 From: Obinna Odirionye Date: Fri, 28 Jan 2022 02:01:47 +0400 Subject: [PATCH 37/40] Update pkg/containerruntime/docker_config_test.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marko Mudrinić --- pkg/containerruntime/docker_config_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/containerruntime/docker_config_test.go b/pkg/containerruntime/docker_config_test.go index b217d9195..7e4ea443b 100644 --- a/pkg/containerruntime/docker_config_test.go +++ b/pkg/containerruntime/docker_config_test.go @@ -41,7 +41,7 @@ func Test_marshalDockerConfig(t *testing.T) { gotLogSize := cfg.LogOpts["max-size"] if err != nil { - return + t.Errorf("failed to unmarshal docker config: %v", err) } if gotLogSize != tt.want { t.Errorf("marshalDockerConfig() got = %v, want %v", got, tt.want) From e991ba01cf1db6fea52b9684bbf23e5c6f324d8f Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Fri, 28 Jan 2022 02:23:34 +0400 Subject: [PATCH 38/40] chore: add suggestion and update tests Signed-off-by: nerdeveloper --- docs/api_reference/v1beta1.en.md | 2 +- docs/api_reference/v1beta2.en.md | 4 ++-- pkg/containerruntime/docker_config_test.go | 8 ++++---- pkg/scripts/os_test.go | 3 +++ pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden | 2 +- .../TestKubeadmAmazonLinux-overwrite_registry.golden | 2 +- ...tKubeadmAmazonLinux-overwrite_registry_insecure.golden | 2 +- pkg/scripts/testdata/TestKubeadmAmazonLinux-proxy.golden | 2 +- pkg/scripts/testdata/TestKubeadmAmazonLinux-simple.golden | 2 +- .../testdata/TestKubeadmAmazonLinux-v1.16.1.golden | 2 +- pkg/scripts/testdata/TestKubeadmCentOS-force.golden | 2 +- .../testdata/TestKubeadmCentOS-overwrite_registry.golden | 2 +- .../TestKubeadmCentOS-overwrite_registry_insecure.golden | 2 +- pkg/scripts/testdata/TestKubeadmCentOS-proxy.golden | 2 +- pkg/scripts/testdata/TestKubeadmCentOS-simple.golden | 2 +- pkg/scripts/testdata/TestKubeadmCentOS-v1.16.1.golden | 2 +- .../testdata/TestKubeadmDebian-overwrite_registry.golden | 2 +- .../TestKubeadmDebian-overwrite_registry_insecure.golden | 2 +- pkg/scripts/testdata/TestKubeadmDebian-simple.golden | 2 +- pkg/scripts/testdata/TestKubeadmFlatcar-force.golden | 2 +- .../testdata/TestKubeadmFlatcar-overwrite_registry.golden | 2 +- .../TestKubeadmFlatcar-overwrite_registry_insecure.golden | 2 +- pkg/scripts/testdata/TestKubeadmFlatcar-simple.golden | 2 +- .../testdata/TestUpgradeKubeadmAndCNIAmazonLinux.golden | 2 +- .../testdata/TestUpgradeKubeadmAndCNICentOS.golden | 2 +- .../testdata/TestUpgradeKubeadmAndCNIDebian.golden | 2 +- .../TestUpgradeKubeletAndKubectlAmazonLinux.golden | 2 +- .../testdata/TestUpgradeKubeletAndKubectlCentOS.golden | 2 +- .../testdata/TestUpgradeKubeletAndKubectlDebian.golden | 2 +- 29 files changed, 35 insertions(+), 32 deletions(-) diff --git a/docs/api_reference/v1beta1.en.md b/docs/api_reference/v1beta1.en.md index e6da2b7c2..41eece834 100644 --- a/docs/api_reference/v1beta1.en.md +++ b/docs/api_reference/v1beta1.en.md @@ -1,6 +1,6 @@ +++ title = "v1beta1 API Reference" -date = 2022-01-26T15:22:37+04:00 +date = 2022-01-28T02:22:19+04:00 weight = 11 +++ ## v1beta1 diff --git a/docs/api_reference/v1beta2.en.md b/docs/api_reference/v1beta2.en.md index 9d331f2f4..32b734f31 100644 --- a/docs/api_reference/v1beta2.en.md +++ b/docs/api_reference/v1beta2.en.md @@ -1,6 +1,6 @@ +++ title = "v1beta2 API Reference" -date = 2022-01-26T15:22:37+04:00 +date = 2022-01-28T02:22:19+04:00 weight = 11 +++ ## v1beta2 @@ -491,7 +491,7 @@ KubeletConfig provides some kubelet configuration options ### LoggingConfig -LoggingConfig +LoggingConfig configures the Kubelet's log rotation | Field | Description | Scheme | Required | | ----- | ----------- | ------ | -------- | diff --git a/pkg/containerruntime/docker_config_test.go b/pkg/containerruntime/docker_config_test.go index 7e4ea443b..bee224cca 100644 --- a/pkg/containerruntime/docker_config_test.go +++ b/pkg/containerruntime/docker_config_test.go @@ -34,15 +34,15 @@ func Test_marshalDockerConfig(t *testing.T) { got, err := marshalDockerConfig(tt.cluster) if err != nil { t.Errorf("marshalDockerConfig() error = %v,", err) - return } cfg := dockerConfig{} err = json.Unmarshal([]byte(got), &cfg) - gotLogSize := cfg.LogOpts["max-size"] - if err != nil { - t.Errorf("failed to unmarshal docker config: %v", err) + t.Errorf("marshalDockerConfig() error = %v,", err) + } + gotLogSize := cfg.LogOpts["max-size"] + if gotLogSize != tt.want { t.Errorf("marshalDockerConfig() got = %v, want %v", got, tt.want) } diff --git a/pkg/scripts/os_test.go b/pkg/scripts/os_test.go index 93065e36e..277c51dd9 100644 --- a/pkg/scripts/os_test.go +++ b/pkg/scripts/os_test.go @@ -101,6 +101,9 @@ func genCluster(opts ...genClusterOpts) kubeone.KubeOneCluster { HTTPS: "http://https.proxy", NoProxy: ".local", }, + LoggingConfig: kubeone.LoggingConfig{ + ContainerLogMaxSize: "100Mi", + }, } for _, fn := range opts { diff --git a/pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden b/pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden index 551ab5855..7563ccc62 100644 --- a/pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden +++ b/pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden @@ -88,7 +88,7 @@ cat < Date: Fri, 28 Jan 2022 02:29:10 +0400 Subject: [PATCH 39/40] chore: fix linting Signed-off-by: nerdeveloper --- pkg/containerruntime/docker_config_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/containerruntime/docker_config_test.go b/pkg/containerruntime/docker_config_test.go index bee224cca..2fa439535 100644 --- a/pkg/containerruntime/docker_config_test.go +++ b/pkg/containerruntime/docker_config_test.go @@ -39,10 +39,8 @@ func Test_marshalDockerConfig(t *testing.T) { err = json.Unmarshal([]byte(got), &cfg) if err != nil { t.Errorf("marshalDockerConfig() error = %v,", err) - } gotLogSize := cfg.LogOpts["max-size"] - if gotLogSize != tt.want { t.Errorf("marshalDockerConfig() got = %v, want %v", got, tt.want) } From 486f984a4c906ccde15ed1d9723c62b084d9c4b7 Mon Sep 17 00:00:00 2001 From: Artiom Diomin Date: Fri, 28 Jan 2022 09:40:24 +0200 Subject: [PATCH 40/40] Add boilerplate to docker_config_test.go Signed-off-by: Artiom Diomin --- pkg/containerruntime/docker_config_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/containerruntime/docker_config_test.go b/pkg/containerruntime/docker_config_test.go index 2fa439535..f7cd25199 100644 --- a/pkg/containerruntime/docker_config_test.go +++ b/pkg/containerruntime/docker_config_test.go @@ -1,3 +1,19 @@ +/* +Copyright 2022 The KubeOne 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 containerruntime import (