mirror of https://github.com/k3s-io/k3s
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
commit
8705dbaa82
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue