Merge pull request #112272 from chendave/cleanupflags

kubeadm: using the existing exported method to add config flag
This commit is contained in:
Kubernetes Prow Robot 2022-09-06 22:26:36 -07:00 committed by GitHub
commit 4b9575acb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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.",