kubeadm: using the existing exported method to add config flag

Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
Dave Chen 2022-09-07 11:46:57 +08:00
parent cba0dcecc9
commit 6675bea8a2

View File

@ -286,10 +286,7 @@ func addJoinConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1.JoinConfigurati
// addJoinOtherFlags adds join flags that are not bound to a configuration file to the given flagset
func addJoinOtherFlags(flagSet *flag.FlagSet, joinOptions *joinOptions) {
flagSet.StringVar(
&joinOptions.cfgPath, options.CfgPath, joinOptions.cfgPath,
"Path to kubeadm config file.",
)
options.AddConfigFlag(flagSet, &joinOptions.cfgPath)
flagSet.StringSliceVar(
&joinOptions.ignorePreflightErrors, options.IgnorePreflightErrors, joinOptions.ignorePreflightErrors,
"A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.",