Merge pull request #45231 from dmmcquay/kubeadm_test_cmds_preflight_skip

Automatic merge from submit-queue (batch tested with PRs 45227, 43003, 45231)

kubeadm: move preflight kubelet check

**What this PR does / why we need it**: If you passed the `--skip-preflight-checks` to kubeadm, it would still try to start up the kubelet, which is part of preflight checks. This was causing issues for test-cmds. Now, passing `--skip-preflight-checks` will skip over the kubelet check. 

**Special notes for your reviewer**: /cc @luxas @deads2k 

**Release note**:
```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2017-05-02 11:24:55 -07:00 committed by GitHub
commit 8705dbaa82
2 changed files with 6 additions and 6 deletions

View File

@ -175,13 +175,13 @@ func NewInit(cfgPath string, cfg *kubeadmapi.MasterConfiguration, skipPreFlight,
if err := preflight.RunInitMasterChecks(cfg); err != nil {
return nil, err
}
// Try to start the kubelet service in case it's inactive
preflight.TryStartKubelet()
} else {
fmt.Println("[preflight] Skipping pre-flight checks")
}
// Try to start the kubelet service in case it's inactive
preflight.TryStartKubelet()
return &Init{cfg: cfg, skipTokenPrint: skipTokenPrint}, nil
}

View File

@ -156,13 +156,13 @@ func NewJoin(cfgPath string, args []string, cfg *kubeadmapi.NodeConfiguration, s
if err := preflight.RunJoinNodeChecks(cfg); err != nil {
return nil, err
}
// Try to start the kubelet service in case it's inactive
preflight.TryStartKubelet()
} else {
fmt.Println("[preflight] Skipping pre-flight checks")
}
// Try to start the kubelet service in case it's inactive
preflight.TryStartKubelet()
return &Join{cfg: cfg}, nil
}