-
Notifications
You must be signed in to change notification settings - Fork 956
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
Use the namespace configuration in kubeconfig #2596
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
a724c72
to
a0df599
Compare
Signed-off-by: wangyang <wangyang289@huawei.com>
a0df599
to
a9b3a69
Compare
Please add you test result, thanks @wangyang0616 |
Okay, the test results have been updated to the description of the PR. |
var deleteJobFlags = &deleteFlags{} | ||
|
||
// InitDeleteFlags init the delete command flags. | ||
func InitDeleteFlags(cmd *cobra.Command) { | ||
initFlags(cmd, &deleteJobFlags.commonFlags) | ||
|
||
cmd.Flags().StringVarP(&deleteJobFlags.Namespace, "namespace", "n", "default", "the namespace of job") | ||
cmd.Flags().StringVarP(&deleteJobFlags.Namespace, "namespace", "n", "", "the namespace of job") |
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 use empty string as default value?
func (dflags *deleteFlags) GetMasterUrl() string { | ||
return dflags.Master | ||
} | ||
|
||
func (dflags *deleteFlags) GetKubeconfigPath() string { | ||
return dflags.Kubeconfig | ||
} | ||
|
||
func (dflags *deleteFlags) GetNamespace() string { | ||
return dflags.Namespace | ||
} | ||
|
||
func (dflags *deleteFlags) SetNamespace(ns string) error { | ||
dflags.Namespace = ns | ||
return nil | ||
} | ||
|
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.
There are many similar repetitive functions below, I think this kind of scene is very suitable for generics
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
/reopen |
@lowang-bh: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@wangyang0616: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
``Signed-off-by: wangyang wangyang289@huawei.com
fix: #2594
test
The job information in the cluster is as follows: