Skip to content
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

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

helen-frank
Copy link
Contributor

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?:

NONE

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 25, 2022
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 25, 2022
@helen-frank helen-frank changed the title Feature/new factory merge New Factory global flags merge function Oct 25, 2022
@karmada-bot karmada-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 25, 2022
pkg/karmadactl/apply.go Outdated Show resolved Hide resolved
@jwcesign
Copy link
Member

Other lgtm

@helen-frank helen-frank requested review from lonelyCZ and removed request for carlory and prodanlabs October 29, 2022 09:17
@helen-frank
Copy link
Contributor Author

/retest

@helen-frank
Copy link
Contributor Author

/cc @lonelyCZ

pkg/karmadactl/apply.go Outdated Show resolved Hide resolved
pkg/karmadactl/options/global.go Outdated Show resolved Hide resolved
@karmada-bot karmada-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 7, 2022
@helen-frank helen-frank force-pushed the feature/NewFactoryMerge branch 2 times, most recently from 5845831 to 1c5ffc3 Compare November 7, 2022 10:00
@helen-frank
Copy link
Contributor Author

/retest

@lonelyCZ
Copy link
Member

lonelyCZ commented Nov 8, 2022

I just tested it, and it worked fine in my env.

Hi, @RainbowMango , please help to retrigger the workflows.

@lonelyCZ
Copy link
Member

lonelyCZ commented Nov 8, 2022

PTAL

/cc @carlory

@@ -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.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not options.AddKubeConfigFlags()?

Copy link
Contributor Author

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.

@helen-frank helen-frank force-pushed the feature/NewFactoryMerge branch 2 times, most recently from 601ddca to 1a19c52 Compare November 9, 2022 02:27
@karmada-bot karmada-bot added the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Nov 9, 2022
Signed-off-by: helen <haitao.zhang@daocloud.io>
@karmada-bot karmada-bot removed the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Nov 9, 2022
@lonelyCZ
Copy link
Member

lonelyCZ commented Nov 9, 2022

Please take a look~

/cc @carlory

@lonelyCZ
Copy link
Member

It works fine in my env.

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 10, 2022
@karmada-bot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 10, 2022
@karmada-bot karmada-bot merged commit 393fb9d into karmada-io:master Nov 10, 2022
@XiShanYongYe-Chang
Copy link
Member

Change the label to the correct one.
/kind cleanup
/remove-kind feature

@karmada-bot karmada-bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants