From e2467b2081e5aac5d83fab11d2492c706f57b19b Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Mon, 27 Apr 2020 17:53:55 -0700 Subject: [PATCH] just always apply overlay --- pkg/minikube/bootstrapper/bootstrapper.go | 1 - pkg/minikube/bootstrapper/kubeadm/kubeadm.go | 11 +++-------- pkg/minikube/node/start.go | 4 ---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/pkg/minikube/bootstrapper/bootstrapper.go b/pkg/minikube/bootstrapper/bootstrapper.go index e7ae9ba385..0019b1750d 100644 --- a/pkg/minikube/bootstrapper/bootstrapper.go +++ b/pkg/minikube/bootstrapper/bootstrapper.go @@ -46,7 +46,6 @@ type Bootstrapper interface { LogCommands(config.ClusterConfig, LogOptions) map[string]string SetupCerts(config.KubernetesConfig, config.Node) error GetAPIServerStatus(string, int) (string, error) - ApplyCNI(config.ClusterConfig) error } const ( diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index 2c1b57aaaf..7111d0e567 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -226,11 +226,10 @@ func (k *Bootstrapper) init(cfg config.ClusterConfig) error { glog.Errorf("unable to create cluster role binding, some addons might not work: %v", err) } // the overlay is required for containerd and cri-o runtime: see #7428 - if config.MultiNode(cfg) || (driver.IsKIC(cfg.Driver) && cfg.KubernetesConfig.ContainerRuntime != "docker") { - if err := k.applyKICOverlay(cfg); err != nil { - glog.Errorf("failed to apply kic overlay: %v", err) - } + if err := k.applyKICOverlay(cfg); err != nil { + glog.Errorf("failed to apply kic overlay: %v", err) } + wg.Done() }() @@ -809,10 +808,6 @@ func kubectlPath(cfg config.ClusterConfig) string { return path.Join(vmpath.GuestPersistentDir, "binaries", cfg.KubernetesConfig.KubernetesVersion, "kubectl") } -func (k *Bootstrapper) ApplyCNI(cfg config.ClusterConfig) error { - return k.applyKICOverlay(cfg) -} - // applyKICOverlay applies the CNI plugin needed to make kic work func (k *Bootstrapper) applyKICOverlay(cfg config.ClusterConfig) error { fmt.Println("APPLYING KIC OVERLAY") diff --git a/pkg/minikube/node/start.go b/pkg/minikube/node/start.go index 92458dbc74..aeb825965c 100644 --- a/pkg/minikube/node/start.go +++ b/pkg/minikube/node/start.go @@ -169,10 +169,6 @@ func Start(starter Starter, apiServer bool) (*kubeconfig.Settings, error) { if err = bs.JoinCluster(*starter.Cfg, *starter.Node, joinCmd); err != nil { return nil, errors.Wrap(err, "joining cluster") } - - if err = cpBs.ApplyCNI(*starter.Cfg); err != nil { - return nil, errors.Wrap(err, "applying CNI") - } } wg.Wait()