Merge pull request #1825 from wuyingjun-lucky/taint_bug

fix karmadactl taint failed
This commit is contained in:
karmada-bot 2022-05-19 14:28:46 +08:00 committed by GitHub
commit 97fc9d5bca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -115,6 +115,12 @@ func (o *CommandTaintOption) Complete(args []string) error {
}
kubeConfigFlags := genericclioptions.NewConfigFlags(false).WithDeprecatedPasswordFlag()
if o.KubeConfig != "" {
kubeConfigFlags.KubeConfig = &o.KubeConfig
kubeConfigFlags.Context = &o.KarmadaContext
}
matchVersionKubeConfigFlags := cmdutil.NewMatchVersionFlags(kubeConfigFlags)
f := cmdutil.NewFactory(matchVersionKubeConfigFlags)