mirror of https://github.com/k3s-io/k3s
kubeadm: remove warning about config usage
parent
f0beaf46db
commit
b9816b1231
|
@ -141,7 +141,7 @@ func getSelfhostingSubCommand(in io.Reader) *cobra.Command {
|
||||||
// Add flags to the command
|
// Add flags to the command
|
||||||
// flags bound to the configuration object
|
// flags bound to the configuration object
|
||||||
cmd.Flags().StringVar(&cfg.CertificatesDir, "cert-dir", cfg.CertificatesDir, `The path where certificates are stored`)
|
cmd.Flags().StringVar(&cfg.CertificatesDir, "cert-dir", cfg.CertificatesDir, `The path where certificates are stored`)
|
||||||
cmd.Flags().StringVar(&cfgPath, "config", cfgPath, "Path to a kubeadm config file. WARNING: Usage of a configuration file is experimental")
|
options.AddConfigFlag(cmd.Flags(), &cfgPath)
|
||||||
|
|
||||||
cmd.Flags().BoolVarP(
|
cmd.Flags().BoolVarP(
|
||||||
&certsInSecrets, "store-certs-in-secrets", "s",
|
&certsInSecrets, "store-certs-in-secrets", "s",
|
||||||
|
|
|
@ -329,7 +329,7 @@ func NewCmdConfigUploadFromFile(out io.Writer, kubeConfigFile *string) *cobra.Co
|
||||||
kubeadmutil.CheckErr(err)
|
kubeadmutil.CheckErr(err)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
cmd.Flags().StringVar(&cfgPath, "config", "", "Path to a kubeadm config file. WARNING: Usage of a configuration file is experimental.")
|
options.AddConfigFlag(cmd.Flags(), &cfgPath)
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -238,10 +238,7 @@ func AddInitConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1beta1.InitConfig
|
||||||
|
|
||||||
// AddInitOtherFlags adds init flags that are not bound to a configuration file to the given flagset
|
// AddInitOtherFlags adds init flags that are not bound to a configuration file to the given flagset
|
||||||
func AddInitOtherFlags(flagSet *flag.FlagSet, cfgPath *string, skipTokenPrint, dryRun *bool, ignorePreflightErrors *[]string) {
|
func AddInitOtherFlags(flagSet *flag.FlagSet, cfgPath *string, skipTokenPrint, dryRun *bool, ignorePreflightErrors *[]string) {
|
||||||
flagSet.StringVar(
|
options.AddConfigFlag(flagSet, cfgPath)
|
||||||
cfgPath, options.CfgPath, *cfgPath,
|
|
||||||
"Path to kubeadm config file. WARNING: Usage of a configuration file is experimental.",
|
|
||||||
)
|
|
||||||
flagSet.StringSliceVar(
|
flagSet.StringSliceVar(
|
||||||
ignorePreflightErrors, options.IgnorePreflightErrors, *ignorePreflightErrors,
|
ignorePreflightErrors, options.IgnorePreflightErrors, *ignorePreflightErrors,
|
||||||
"A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.",
|
"A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.",
|
||||||
|
|
|
@ -129,8 +129,8 @@ func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command {
|
||||||
kubeadmutil.CheckErr(err)
|
kubeadmutil.CheckErr(err)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
createCmd.Flags().StringVar(&cfgPath,
|
|
||||||
"config", cfgPath, "Path to kubeadm config file (WARNING: Usage of a configuration file is experimental)")
|
options.AddConfigFlag(createCmd.Flags(), &cfgPath)
|
||||||
createCmd.Flags().BoolVar(&printJoinCommand,
|
createCmd.Flags().BoolVar(&printJoinCommand,
|
||||||
"print-join-command", false, "Instead of printing only the token, print the full 'kubeadm join' flag needed to join the cluster using the token.")
|
"print-join-command", false, "Instead of printing only the token, print the full 'kubeadm join' flag needed to join the cluster using the token.")
|
||||||
bto.AddTTLFlagWithName(createCmd.Flags(), "ttl")
|
bto.AddTTLFlagWithName(createCmd.Flags(), "ttl")
|
||||||
|
|
Loading…
Reference in New Issue