From d38afb136793bc719281797016a0cccd4d0efaa1 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Fri, 25 May 2018 19:19:12 +0300 Subject: [PATCH] remove CrictlChecker from preflight checks CrictlChecker uses InPathCheck to check if crictl presents in the PATH. The same check is done in CRICheck function. CrictlChecker is also called unconditionally, producing messages that can confuse users. CRICheck is called only when needed, i.e. when user specifies CRI socket. --- cmd/kubeadm/app/preflight/checks.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cmd/kubeadm/app/preflight/checks.go b/cmd/kubeadm/app/preflight/checks.go index 8b3c5cb6a98..3aa67e7bfb3 100644 --- a/cmd/kubeadm/app/preflight/checks.go +++ b/cmd/kubeadm/app/preflight/checks.go @@ -959,15 +959,6 @@ func RunJoinNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.NodeConfigura // addCommonChecks is a helper function to deplicate checks that are common between both the // kubeadm init and join commands func addCommonChecks(execer utilsexec.Interface, cfg kubeadmapi.CommonConfiguration, checks []Checker) []Checker { - // check if we can use crictl to perform checks via the CRI - glog.V(1).Infoln("checking if we can use crictl to perform checks via the CRI") - criCtlChecker := InPathCheck{ - executable: "crictl", - mandatory: false, - exec: execer, - suggestion: fmt.Sprintf("go get %v", kubeadmconstants.CRICtlPackage), - } - // Check whether or not the CRI socket defined is the default if cfg.GetCRISocket() != kubeadmdefaults.DefaultCRISocket { checks = append(checks, CRICheck{socket: cfg.GetCRISocket(), exec: execer}) @@ -990,7 +981,6 @@ func addCommonChecks(execer utilsexec.Interface, cfg kubeadmapi.CommonConfigurat InPathCheck{executable: "socat", mandatory: false, exec: execer}, InPathCheck{executable: "tc", mandatory: false, exec: execer}, InPathCheck{executable: "touch", mandatory: false, exec: execer}, - criCtlChecker, ResolveCheck{}) } checks = append(checks,