Add warning when --certificate-key is set and --control-plane is not.
This commit is contained in:
		@@ -342,6 +342,9 @@ func newJoinData(cmd *cobra.Command, args []string, opt *joinOptions, out io.Wri
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// if not joining a control plane, unset the ControlPlane object
 | 
						// if not joining a control plane, unset the ControlPlane object
 | 
				
			||||||
	if !opt.controlPlane {
 | 
						if !opt.controlPlane {
 | 
				
			||||||
 | 
							if opt.externalcfg.ControlPlane != nil {
 | 
				
			||||||
 | 
								klog.Warningf("[preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when %s flag is not set.", options.ControlPlane)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		opt.externalcfg.ControlPlane = nil
 | 
							opt.externalcfg.ControlPlane = nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user