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

Introduce short names for Knative resources #1588

Closed
steren opened this issue Jul 13, 2018 · 8 comments
Closed

Introduce short names for Knative resources #1588

steren opened this issue Jul 13, 2018 · 8 comments
Assignees
Labels
area/API API objects and controllers

Comments

@steren
Copy link
Contributor

steren commented Jul 13, 2018

/area API

I suggest to introduce short names for the Knative resources ("Service", "Revision", "Configuration", "Route") for the following reasons:

  • short names of 2-3 letters are faster to type than names like configurations
  • the qualifier for "Service" is services.serving.knative.dev, which is long to type when using kubectl

Kubernetes allows to define short names. See here for an example.

Let's use this issue to suggest short names. We could use some user research to validate them if we need. CC @tliberman

@grantr
Copy link
Contributor

grantr commented Jul 13, 2018

Some obvious ones to start off:

  • rev
  • cfg
  • svc (though ksvc might be less confusing)
  • rt

@steren
Copy link
Contributor Author

steren commented Jul 13, 2018

I was about to suggest the same.

In addition to cfg, I would suggest to also add config

@enisoc
Copy link

enisoc commented Jul 13, 2018

FYI svc is already a short name for the core Service. I tried adding svc as the short name of a CRD, and surprisingly the CRD now takes precedence over the core resource, which could be quite confusing and disruptive to kubectl users. Even if the precedence had gone the other way, it still wouldn't make sense to use svc since it would defeat the purpose of disambiguating from the core Service.

I do like the idea to add short names though.

@steren
Copy link
Contributor Author

steren commented Jul 13, 2018

Yes, this is why @grantr suggested ksvc too.

Also, this is pattern we could use for all Knative resource short names: krev, kcfg, ksvc, krt. It reduces readability, but prevents current and future collisions.

@imikushin
Copy link
Contributor

Should obviously all start with k

@steren
Copy link
Contributor Author

steren commented Aug 3, 2018

I can read in another comment that the short names do not resolve to fully qualified names, and thus kservice is conflicting with service. We agree this is a but ob the Kubernetes side. What's the next step here?
@n3wscott Is there an existing issue tracking the problem?

@n3wscott
Copy link
Contributor

n3wscott commented Aug 3, 2018

I did not make a new issue for it. I just documented it in this issue #1397 (comment)

@n3wscott
Copy link
Contributor

n3wscott commented Aug 3, 2018

Update: it looks like upstream kubectl fixes the issue I have mentioned.

Current:

⦿ kubectl get svc
NAME                              TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
github-flow                       ClusterIP   10.19.245.231   <none>        80/TCP    8d
github-flow-channel               ClusterIP   10.19.252.196   <none>        80/TCP    7d
github-n3wscott-kopond-rcvadptr   ClusterIP   10.19.241.219   <none>        80/TCP    7d
kubernetes                        ClusterIP   10.19.240.1     <none>        443/TCP   38d
legit                             ClusterIP   10.19.255.95    <none>        80/TCP    8d
⦿ kubectl get ksvc
NAME                              TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
github-flow                       ClusterIP   10.19.245.231   <none>        80/TCP    8d
github-flow-channel               ClusterIP   10.19.252.196   <none>        80/TCP    7d
github-n3wscott-kopond-rcvadptr   ClusterIP   10.19.241.219   <none>        80/TCP    7d
kubernetes                        ClusterIP   10.19.240.1     <none>        443/TCP   38d
legit                             ClusterIP   10.19.255.95    <none>        80/TCP    8d

Updated:

⦿ ./_output/bin/kubectl get svc
NAME                              TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
github-flow                       ClusterIP   10.19.245.231   <none>        80/TCP    8d
github-flow-channel               ClusterIP   10.19.252.196   <none>        80/TCP    7d
github-n3wscott-kopond-rcvadptr   ClusterIP   10.19.241.219   <none>        80/TCP    7d
kubernetes                        ClusterIP   10.19.240.1     <none>        443/TCP   38d
legit                             ClusterIP   10.19.255.95    <none>        80/TCP    8d
⦿ ./_output/bin/kubectl get ksvc
NAME                              CREATED AT
github-n3wscott-kopond-rcvadptr   7d
legit                             8d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API API objects and controllers
Projects
None yet
Development

No branches or pull requests

7 participants