Add warning when --certificate-key is set and --control-plane is not.

This commit is contained in:
Jianfei Bai 2019-10-13 21:39:12 +08:00
parent 6d97d36fbb
commit 6dbf154d43

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
}