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

Add short name "netpol" for networkpolicies #42241

Merged
merged 1 commit into from
Apr 25, 2017

Conversation

xiangpengzhao
Copy link
Contributor

@xiangpengzhao xiangpengzhao commented Feb 28, 2017

What this PR does / why we need it:
Add short name for networkpolicies in kubectl command for good user experience.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
None

Special notes for your reviewer:
None

Release note:

Add short name "netpol" for networkpolicies

@k8s-ci-robot
Copy link
Contributor

Hi @xiangpengzhao. 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 @k8s-bot 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.

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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 28, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

The following people have approved this PR: xiangpengzhao

Needs approval from an approver in each of these OWNERS Files:

We suggest the following people:
cc @pwittrock
You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels Feb 28, 2017
@0xmichalis
Copy link
Contributor

@kubernetes/sig-cli-api-reviews

@0xmichalis
Copy link
Contributor

/release-note

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Feb 28, 2017
@0xmichalis
Copy link
Contributor

@kubernetes/sig-network-api-reviews

@xiangpengzhao
Copy link
Contributor Author

xiangpengzhao commented Feb 28, 2017

Thanks @Kargakis !

Should we also add short names for other resources e.g. clusterrolebindings ?

    * certificatesigningrequests (aka 'csr')
    * clusters (valid only for federation apiservers)
    * clusterrolebindings
    * clusterroles
    * componentstatuses (aka 'cs')
    * configmaps (aka 'cm')
    * daemonsets (aka 'ds')
    * deployments (aka 'deploy')
    * endpoints (aka 'ep')
    * events (aka 'ev')
    * horizontalpodautoscalers (aka 'hpa')
    * ingresses (aka 'ing')
    * jobs
    * limitranges (aka 'limits')
    * namespaces (aka 'ns')
    * networkpolicies (aka 'netpol')
    * nodes (aka 'no')
    * persistentvolumeclaims (aka 'pvc')
    * persistentvolumes (aka 'pv')
    * pods (aka 'po')
    * poddisruptionbudgets (aka 'pdb')
    * podsecuritypolicies (aka 'psp')
    * podtemplates
    * replicasets (aka 'rs')
    * replicationcontrollers (aka 'rc')
    * resourcequotas (aka 'quota')
    * rolebindings
    * roles
    * secrets
    * serviceaccounts (aka 'sa')
    * services (aka 'svc')
    * statefulsets
    * storageclasses
    * thirdpartyresources

@xiangpengzhao
Copy link
Contributor Author

Oh, just find @gyliu513 posted an issue talking about short names for some other resources #42129

Guangya, are you working on these resources?

@gyliu513
Copy link
Contributor

@xiangpengzhao I think that you can cover all of those issues here, I will try to close my issue if you can cover all of the short names, comments?

Just some proposal for short names

    * statefulsets  (aka 'ss')
    * storageclasses  (aka 'sc')
    * thirdpartyresources  (aka 'tpr')

@0xmichalis
Copy link
Contributor

StatefulSet alias is being discussed in #37099

@thockin
Copy link
Member

thockin commented Feb 28, 2017

@smarterclayton There was some concern about new shortcut names - what's the current thinking?

@smarterclayton
Copy link
Contributor

Just that we be very judicious and actually think through how often they will be used, because they become part of the public CLI API (can't change them without breaking scripts). Any time we still a two letter alias, we are preventing ourselves from using it in the future. The bar for getting an alias is inversely proportional to how long it is and how often it is used (we shouldn't add short aliases for rarely used classes).

Most cluster scoped resources aren't going to be accessed that often. We have tab completion, so I'd lean towards no shortcut for rarely accessed resources.

@thockin
Copy link
Member

thockin commented Mar 1, 2017 via email

@xiangpengzhao
Copy link
Contributor Author

From a user's perspective, my first reaction is thinking the first letters of the full name of a resource as its shortcut name. If using netpol or something else, users may have to try several times to find the right shortcut:) On the other hand, using np will keep the same style with the most existing shortcuts.

@smarterclayton
Copy link
Contributor

smarterclayton commented Mar 1, 2017 via email

@xiangpengzhao
Copy link
Contributor Author

Reasonable. These resources are indeed not used so often. Then should we close this PR or just merge it and leave other resources without shortcuts as they are now?

@thockin
Copy link
Member

thockin commented Mar 1, 2017 via email

@xiangpengzhao xiangpengzhao changed the title Add short name "np" for networkpolicies Add short name "netpol" for networkpolicies Mar 1, 2017
@xiangpengzhao
Copy link
Contributor Author

Addressed, but not sure if it's still necessary to merge this according to @smarterclayton 's reason :)

@thockin
Copy link
Member

thockin commented Mar 1, 2017

@k8s-bot ok to test

@thockin thockin added approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Mar 1, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@0xmichalis 0xmichalis assigned thockin and unassigned 0xmichalis Mar 4, 2017
@thockin
Copy link
Member

thockin commented Mar 4, 2017

@k8s-bot gci gce e2e test this

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Mar 5, 2017

@xiangpengzhao: The following test(s) failed:

Test name Commit Details Rerun command
Jenkins GCE e2e 5daa698 link @k8s-bot cvm gce e2e test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@0xmichalis
Copy link
Contributor

@k8s-bot cvm gce e2e test this #43466

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 44862, 42241, 42101, 43181, 44147)

@k8s-github-robot k8s-github-robot merged commit 390e987 into kubernetes:master Apr 25, 2017
@xiangpengzhao xiangpengzhao deleted the shortname-np branch May 2, 2017 05:56
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants