-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Factory global flags merge function #2684
New Factory global flags merge function #2684
Conversation
83ca2e2
to
311ee84
Compare
Other lgtm |
311ee84
to
0f68cdd
Compare
/retest |
0f68cdd
to
f13a9f4
Compare
/cc @lonelyCZ |
f13a9f4
to
d91bb99
Compare
5845831
to
1c5ffc3
Compare
/retest |
1c5ffc3
to
5574103
Compare
5574103
to
cca44f6
Compare
I just tested it, and it worked fine in my env. Hi, @RainbowMango , please help to retrigger the workflows. |
PTAL /cc @carlory |
cca44f6
to
6d45bfe
Compare
pkg/karmadactl/promote.go
Outdated
@@ -85,8 +86,8 @@ func NewCmdPromote(f util.Factory, parentCommand string) *cobra.Command { | |||
flag := cmd.Flags() | |||
opts.AddFlags(flag) | |||
|
|||
flag.StringVar(defaultConfigFlags.KubeConfig, "kubeconfig", *defaultConfigFlags.KubeConfig, "Path to the kubeconfig file to use for CLI requests.") | |||
flag.StringVar(defaultConfigFlags.Context, "karmada-context", *defaultConfigFlags.Context, "The name of the kubeconfig context to use") | |||
flag.StringVar(options.DefaultConfigFlags.KubeConfig, "kubeconfig", *options.DefaultConfigFlags.KubeConfig, "Path to the kubeconfig file to use for CLI requests.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not options.AddKubeConfigFlags()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the omission, now it has been replaced.
601ddca
to
1a19c52
Compare
Signed-off-by: helen <haitao.zhang@daocloud.io>
531a5af
to
3e77449
Compare
Please take a look~ /cc @carlory |
It works fine in my env. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lonelyCZ The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Change the label to the correct one. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
These code comes multiple times, we may extract them as one function.
Which issue(s) this PR fixes:
Fixes #
Port #2611
Special notes for your reviewer:
Does this PR introduce a user-facing change?: