Merge pull request #83661 from jfbai/fix-kubeadm-join

Add warning when --certificate-key is set and --control-plane is not.
This commit is contained in:
Kubernetes Prow Robot 2019-10-13 08:00:35 -07:00 committed by GitHub
commit f0e1d394f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 !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
}