Merge pull request #66282 from bart0sh/PR0022-kubeadm-require-crictl-only-for-CRI-runtime

Automatic merge from submit-queue. 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>.

check for crictl executable only for CRI runtime

**What this PR does / why we need it**:

crictl is not used for docker runtime, so InPathCheck check can be skipped for docker.

**Release note**:
```release-note
NONE
```
pull/8/head
Kubernetes Submit Queue 2018-07-18 10:01:53 -07:00 committed by GitHub
commit 990b3d707c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -967,11 +967,13 @@ func addCommonChecks(execer utilsexec.Interface, cfg kubeadmapi.CommonConfigurat
// non-windows checks
if runtime.GOOS == "linux" {
if !isDocker {
checks = append(checks, InPathCheck{executable: "crictl", mandatory: true, exec: execer})
}
checks = append(checks,
FileContentCheck{Path: bridgenf, Content: []byte{'1'}},
FileContentCheck{Path: ipv4Forward, Content: []byte{'1'}},
SwapCheck{},
InPathCheck{executable: "crictl", mandatory: true, exec: execer},
InPathCheck{executable: "ip", mandatory: true, exec: execer},
InPathCheck{executable: "iptables", mandatory: true, exec: execer},
InPathCheck{executable: "mount", mandatory: true, exec: execer},