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

omit namespace to avoid ambiguity #84967

Open
wants to merge 2 commits into
base: master
from

Conversation

@donggangcj
Copy link

donggangcj commented Nov 8, 2019

What type of PR is this?

/area kubectl
/kind cleanup

What this PR does / why we need it:This PR resolve eliminate the ambiguity kubectl get returnd.

Which issue(s) this PR fixes:kubernetes/kubectl#757

Special notes for your reviewer:
/assign @deads2k @juanvallejo

Does this PR introduce a user-facing change?:Yes

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 8, 2019

@donggangcj: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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.

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 8, 2019

Welcome @donggangcj!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 8, 2019

Hi @donggangcj. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@donggangcj

This comment has been minimized.

Copy link
Author

donggangcj commented Nov 11, 2019

/assign @smarterclayton

@zhouya0

This comment has been minimized.

Copy link
Contributor

zhouya0 commented Nov 11, 2019

Thanks a lot, this might be the sulotion. But i think if we want to reserve namespace we can use a bool variable like printWithNamespace in Run function.
Like in many resources, once we found a resource printWithNamespace is false, we are not going to print namespace.

@donggangcj

This comment has been minimized.

Copy link
Author

donggangcj commented Nov 11, 2019

@zhouya0 Thanks. The get command can get namespaced and nonamespaced resource at the same time。if Command kubectl get nodes,pods --printWithNamespace=true return No resouce found in default namespace,it is still ambiguous.It is wise to ignore the namespace information in the old version. This namespace information is of no value to the user because when necessary, the user will specify the flag --namesapce.
My english is pool.😂

@smarterclayton

This comment has been minimized.

Copy link
Contributor

smarterclayton commented Nov 12, 2019

/ok-to-test

The message shouldn't be relying on "all-namespaces". We might want to base the message on whether all resources listed are namespaced (which wouldn't work for files from disk) and allNamespaces is set. What does it look like to determine whether all resource info inputs are namespaced from this part of the code?

@k8s-ci-robot k8s-ci-robot added size/S and removed size/XS labels Nov 13, 2019
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 13, 2019

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: donggangcj
To complete the pull request process, please assign deads2k
You can assign the PR to them by writing /assign @deads2k in a comment when ready.

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

@donggangcj

This comment has been minimized.

Copy link
Author

donggangcj commented Nov 13, 2019

@smarterclayton I think it is not worth determining whether all resource info inputs are namespaced from this part of the code. Users don't seem to care about the result message whether cotain the namespace info when no resouce found. 🙂and what is your suggestion?

@donggangcj

This comment has been minimized.

Copy link
Author

donggangcj commented Nov 15, 2019

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.