mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
kubeadm: Don't ask for input if it's dry run mode
Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
parent
d2cea9475b
commit
988b96fcbb
@ -51,7 +51,7 @@ func runPreflight(c workflow.RunData) error {
|
|||||||
return errors.New("preflight phase invoked with an invalid data struct")
|
return errors.New("preflight phase invoked with an invalid data struct")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !r.ForceReset() {
|
if !r.ForceReset() && !r.DryRun() {
|
||||||
klog.Warning("[reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.")
|
klog.Warning("[reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.")
|
||||||
fmt.Print("[reset] Are you sure you want to proceed? [y/N]: ")
|
fmt.Print("[reset] Are you sure you want to proceed? [y/N]: ")
|
||||||
s := bufio.NewScanner(r.InputReader())
|
s := bufio.NewScanner(r.InputReader())
|
||||||
|
Loading…
Reference in New Issue
Block a user