mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Kubeadm: Cleanup runPreflight in join/preflight
Signed-off-by: PingWang <wang.ping5@zte.com.cn> update runPreflight in init/preflight.go Signed-off-by: PingWang <wang.ping5@zte.com.cn> cleanup runPreflight in init/preflight.go Signed-off-by: PingWang <wang.ping5@zte.com.cn>
This commit is contained in:
parent
cac53883f4
commit
da88db6321
@ -63,16 +63,13 @@ func runPreflight(c workflow.RunData) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if !data.DryRun() {
|
if data.DryRun() {
|
||||||
fmt.Println("[preflight] Pulling images required for setting up a Kubernetes cluster")
|
|
||||||
fmt.Println("[preflight] This might take a minute or two, depending on the speed of your internet connection")
|
|
||||||
fmt.Println("[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'")
|
|
||||||
if err := preflight.RunPullImagesCheck(utilsexec.New(), data.Cfg(), data.IgnorePreflightErrors()); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
fmt.Println("[preflight] Would pull the required images (like 'kubeadm config images pull')")
|
fmt.Println("[preflight] Would pull the required images (like 'kubeadm config images pull')")
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
fmt.Println("[preflight] Pulling images required for setting up a Kubernetes cluster")
|
||||||
|
fmt.Println("[preflight] This might take a minute or two, depending on the speed of your internet connection")
|
||||||
|
fmt.Println("[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'")
|
||||||
|
return preflight.RunPullImagesCheck(utilsexec.New(), data.Cfg(), data.IgnorePreflightErrors())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user