diff --git a/pkg/platform/provider/baremetal/cluster/create.go b/pkg/platform/provider/baremetal/cluster/create.go index e418be261..99e06653f 100644 --- a/pkg/platform/provider/baremetal/cluster/create.go +++ b/pkg/platform/provider/baremetal/cluster/create.go @@ -270,22 +270,6 @@ func (p *Provider) EnsureDisableSwap(ctx context.Context, c *v1.Cluster) error { return nil } -func (p *Provider) EnsureDisableOffloading(ctx context.Context, c *v1.Cluster) error { - for _, machine := range c.Spec.Machines { - machineSSH, err := machine.SSH() - if err != nil { - return err - } - - _, err = machineSSH.CombinedOutput(`ethtool --offload flannel.1 rx off tx off || true`) - if err != nil { - return errors.Wrap(err, machine.IP) - } - } - - return nil -} - // 因为validate那里没法更新对象(不能存储) // PreCrete,在api中错误只能panic,响应不会有报错提示,所以只能挪到这里处理 func (p *Provider) EnsureClusterComplete(ctx context.Context, cluster *v1.Cluster) error { diff --git a/pkg/platform/provider/baremetal/cluster/provider.go b/pkg/platform/provider/baremetal/cluster/provider.go index 2d4f675ee..c97628bd0 100644 --- a/pkg/platform/provider/baremetal/cluster/provider.go +++ b/pkg/platform/provider/baremetal/cluster/provider.go @@ -131,7 +131,6 @@ func NewProvider() (*Provider, error) { p.EnsureCleanup, p.EnsureCreateClusterMark, - p.EnsureDisableOffloading, // will remove it when upgrade to k8s v1.18.5 p.EnsurePostInstallHook, p.EnsurePostClusterInstallHook, }, diff --git a/pkg/platform/provider/baremetal/machine/create.go b/pkg/platform/provider/baremetal/machine/create.go index 926536c66..f5d838e5d 100644 --- a/pkg/platform/provider/baremetal/machine/create.go +++ b/pkg/platform/provider/baremetal/machine/create.go @@ -26,6 +26,7 @@ import ( "path" "strings" "time" + "tkestack.io/tke/pkg/platform/provider/baremetal/phases/image" "github.com/imdario/mergo" @@ -236,20 +237,6 @@ func (p *Provider) EnsureDisableSwap(ctx context.Context, machine *platformv1.Ma return nil } -func (p *Provider) EnsureDisableOffloading(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error { - machineSSH, err := machine.Spec.SSH() - if err != nil { - return err - } - - _, err = machineSSH.CombinedOutput(`ethtool --offload flannel.1 rx off tx off || true`) - if err != nil { - return err - } - - return nil -} - func (p *Provider) EnsureManifestDir(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error { machineSSH, err := machine.Spec.SSH() if err != nil { diff --git a/pkg/platform/provider/baremetal/machine/provider.go b/pkg/platform/provider/baremetal/machine/provider.go index e95bb8aac..3d82c496d 100644 --- a/pkg/platform/provider/baremetal/machine/provider.go +++ b/pkg/platform/provider/baremetal/machine/provider.go @@ -99,7 +99,6 @@ func NewProvider() (*Provider, error) { p.EnsureKubeconfig, p.EnsureMarkNode, p.EnsureNodeReady, - p.EnsureDisableOffloading, // will remove it when upgrade to k8s v1.18.5 p.EnsurePostInstallHook, }, UpdateHandlers: []machineprovider.Handler{ diff --git a/pkg/platform/provider/edge/cluster/provider.go b/pkg/platform/provider/edge/cluster/provider.go index 21854184f..0e854e7a0 100644 --- a/pkg/platform/provider/edge/cluster/provider.go +++ b/pkg/platform/provider/edge/cluster/provider.go @@ -143,7 +143,6 @@ func NewProvider() (*Provider, error) { p.bCluster.EnsureCleanup, p.bCluster.EnsureCreateClusterMark, - p.bCluster.EnsureDisableOffloading, // will remove it when upgrade to k8s v1.18.5 p.bCluster.EnsurePostInstallHook, p.bCluster.EnsurePostClusterInstallHook, },