Merge pull request #3298 from lonelyCZ/pr-addons-flags

Fixed unable to view the options for karmadactl addons enable/disable
This commit is contained in:
karmada-bot 2023-03-21 14:28:24 +08:00 committed by GitHub
commit 8f32181bf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ func NewCmdAddonsDisable(parentCommand string) *cobra.Command {
return nil
},
}
flags := cmd.PersistentFlags()
flags := cmd.Flags()
opts.GlobalCommandOptions.AddFlags(flags)
flags.BoolVarP(&opts.Force, "force", "f", false, "Disable addons without prompting for confirmation.")
return cmd

View File

@ -70,7 +70,7 @@ func NewCmdAddonsEnable(parentCommand string) *cobra.Command {
releaseVer = &version.ReleaseVersion{} // initialize to avoid panic
}
flags := cmd.PersistentFlags()
flags := cmd.Flags()
opts.GlobalCommandOptions.AddFlags(flags)
flags.IntVar(&opts.WaitComponentReadyTimeout, "pod-timeout", options.WaitComponentReadyTimeout, "Wait pod ready timeout.")
flags.IntVar(&opts.WaitAPIServiceReadyTimeout, "apiservice-timeout", 30, "Wait apiservice ready timeout.")