mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	kubeadm: try to reuse RunData if possible
				
					
				
			The generation of `RunData` for init and join is relative time consuming, the data should be shared / reused whenever possible. Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
		@@ -221,10 +221,12 @@ func (e *Runner) Run(args []string) error {
 | 
			
		||||
		return errors.New(msg.String())
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// builds the runner data
 | 
			
		||||
	var data RunData
 | 
			
		||||
	if data, err = e.InitData(args); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	// builds the runner data if the runtime data is not initialized
 | 
			
		||||
	data := e.runData
 | 
			
		||||
	if data == nil {
 | 
			
		||||
		if data, err = e.InitData(args); err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	err = e.visitAll(func(p *phaseRunner) error {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user