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

kn service get <service-name> will list all the services #143

Closed
savitaashture opened this issue May 27, 2019 · 5 comments
Closed

kn service get <service-name> will list all the services #143

savitaashture opened this issue May 27, 2019 · 5 comments
Assignees
Milestone

Comments

@savitaashture
Copy link
Contributor

savitaashture commented May 27, 2019

Get all the services in particular namespace

kn service get -n test
NAME           DOMAIN                          GENERATION   AGE    CONDITIONS   READY     REASON
autoscale-go   autoscale-go.test.example.com   1            124m   0 OK / 3     Unknown   RevisionMissing : Configuration "autoscale-go" is waiting for a Revision to become ready.
test1          test1.test.example.com          1            118m   0 OK / 3     False     RevisionMissing : Configuration "test1" does not have any ready Revision.

get a particular service by specifying service name

current:

kn service get -n test autoscale-go
NAME           DOMAIN                          GENERATION   AGE    CONDITIONS   READY     REASON
autoscale-go   autoscale-go.test.example.com   1            125m   0 OK / 3     Unknown   RevisionMissing : Configuration "autoscale-go" is waiting for a Revision to become ready.
test1          test1.test.example.com          1            119m   0 OK / 3     False     RevisionMissing : Configuration "test1" does not have any ready Revision.

Expected: Should list only that perticular service.
something like below

kn service get -n test autoscale-go
NAME           DOMAIN                          GENERATION   AGE    CONDITIONS   READY     REASON
autoscale-go   autoscale-go.test.example.com   1            125m   0 OK / 3     Unknown   RevisionMissing : Configuration "autoscale-go" is waiting for a Revision to become ready.

Because of above behavior when we do

kn service get -n test autoscale-go -o yaml

It will give the detailed yaml info for all the services.

Applicable for all kn commands

@navidshaikh
Copy link
Collaborator

navidshaikh commented May 27, 2019

Resource name as argument to get command is not implemented, get command's behavior is to list all resources in requested namespace. Single resource's get is actually describe command in human readable format which should support different output formats with -o option. @rhuss is on it check #75

@rhuss
Copy link
Contributor

rhuss commented May 27, 2019

@navidshaikh I think get should be able to list a single resource as well (in short form), much like kubectl get does, too. This is especially useful for machine-readable output (-o json). We could use the name as literal or as a prefix file (which would be nice for revisions to catch all similar revisions).

kn service describe then is for detailed human-readable output only, but kn get service myservice -o yaml is important so that kn can easily be used for scripting, too.

@navidshaikh
Copy link
Collaborator

@rhuss : sounds good, +1

kn get service myservice -o yaml is important so that kn can easily be used for scripting, too.

👍

@savitaashture
Copy link
Contributor Author

savitaashture commented May 27, 2019

@rhuss @navidshaikh Thank you

/assign

@rhuss
Copy link
Contributor

rhuss commented Jul 10, 2019

Fixed with #150

@rhuss rhuss closed this as completed Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants