mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	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 ```
This commit is contained in:
		@@ -175,12 +175,12 @@ func NewInit(cfgPath string, cfg *kubeadmapi.MasterConfiguration, skipPreFlight,
 | 
			
		||||
		if err := preflight.RunInitMasterChecks(cfg); err != nil {
 | 
			
		||||
			return nil, err
 | 
			
		||||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
		fmt.Println("[preflight] Skipping pre-flight checks")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		// Try to start the kubelet service in case it's inactive
 | 
			
		||||
		preflight.TryStartKubelet()
 | 
			
		||||
	} else {
 | 
			
		||||
		fmt.Println("[preflight] Skipping pre-flight checks")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return &Init{cfg: cfg, skipTokenPrint: skipTokenPrint}, nil
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -156,12 +156,12 @@ func NewJoin(cfgPath string, args []string, cfg *kubeadmapi.NodeConfiguration, s
 | 
			
		||||
		if err := preflight.RunJoinNodeChecks(cfg); err != nil {
 | 
			
		||||
			return nil, err
 | 
			
		||||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
		fmt.Println("[preflight] Skipping pre-flight checks")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		// Try to start the kubelet service in case it's inactive
 | 
			
		||||
		preflight.TryStartKubelet()
 | 
			
		||||
	} else {
 | 
			
		||||
		fmt.Println("[preflight] Skipping pre-flight checks")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return &Join{cfg: cfg}, nil
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user