Unverified Commit 9d36590e authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #64325 from bart0sh/PR000015-remove-CrictlChecker

Automatic merge from submit-queue (batch tested with PRs 57082, 64325, 64016, 64443, 64403). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. remove CrictlChecker from preflight checks **What this PR does / why we need it**: 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. **Release note**: ```release-note NONE ```
parents 3e127ccb d38afb13
...@@ -990,15 +990,6 @@ func RunJoinNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.NodeConfigura ...@@ -990,15 +990,6 @@ func RunJoinNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.NodeConfigura
// addCommonChecks is a helper function to deplicate checks that are common between both the // addCommonChecks is a helper function to deplicate checks that are common between both the
// kubeadm init and join commands // kubeadm init and join commands
func addCommonChecks(execer utilsexec.Interface, cfg kubeadmapi.CommonConfiguration, checks []Checker) []Checker { 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 // Check whether or not the CRI socket defined is the default
if cfg.GetCRISocket() != kubeadmdefaults.DefaultCRISocket { if cfg.GetCRISocket() != kubeadmdefaults.DefaultCRISocket {
checks = append(checks, CRICheck{socket: cfg.GetCRISocket(), exec: execer}) checks = append(checks, CRICheck{socket: cfg.GetCRISocket(), exec: execer})
...@@ -1021,7 +1012,6 @@ func addCommonChecks(execer utilsexec.Interface, cfg kubeadmapi.CommonConfigurat ...@@ -1021,7 +1012,6 @@ func addCommonChecks(execer utilsexec.Interface, cfg kubeadmapi.CommonConfigurat
InPathCheck{executable: "socat", mandatory: false, exec: execer}, InPathCheck{executable: "socat", mandatory: false, exec: execer},
InPathCheck{executable: "tc", mandatory: false, exec: execer}, InPathCheck{executable: "tc", mandatory: false, exec: execer},
InPathCheck{executable: "touch", mandatory: false, exec: execer}, InPathCheck{executable: "touch", mandatory: false, exec: execer},
criCtlChecker,
ResolveCheck{}) ResolveCheck{})
} }
checks = append(checks, checks = append(checks,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment