Skip to content

Commit 6dbf154

Browse files
committed
Add warning when --certificate-key is set and --control-plane is not.
1 parent 6d97d36 commit 6dbf154

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/kubeadm/app/cmd/join.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ func newJoinData(cmd *cobra.Command, args []string, opt *joinOptions, out io.Wri
342342

343343
// if not joining a control plane, unset the ControlPlane object
344344
if !opt.controlPlane {
345+
if opt.externalcfg.ControlPlane != nil {
346+
klog.Warningf("[preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when %s flag is not set.", options.ControlPlane)
347+
}
345348
opt.externalcfg.ControlPlane = nil
346349
}
347350

0 commit comments

Comments
 (0)