Skip to content

Commit f0e1d39

Browse files
authored
Merge pull request kubernetes#83661 from jfbai/fix-kubeadm-join
Add warning when --certificate-key is set and --control-plane is not.
2 parents dd5cb64 + 6dbf154 commit f0e1d39

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)