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 separator between resource types #22

Open
grzesuav opened this issue Apr 11, 2019 · 6 comments
Open

Add separator between resource types #22

grzesuav opened this issue Apr 11, 2019 · 6 comments

Comments

@grzesuav
Copy link

Is your feature request related to a problem? Please describe.
Currently we get one list for all resource types. Would be useful to have it grouped by resource type.

Currently

configmap/coredns                                                                        kube-system  27d    
configmap/extension-apiserver-authentication                                             kube-system  27d    
configmap/kube-proxy                                                                     kube-system  27d    
configmap/kubeadm-config                                                                 kube-system  27d    
configmap/kubelet-config-1.13                                                            kube-system  27d    
endpoints/kube-controller-manager                                                        kube-system  27d    
endpoints/kube-dns                                                                       kube-system  27d    
endpoints/kube-scheduler                                                                 kube-system  27d 

Describe the solution you'd like
Proposal

configmaps:

configmap/coredns                                                                        kube-system  27d    
configmap/extension-apiserver-authentication                                             kube-system  27d    
configmap/kube-proxy                                                                     kube-system  27d    
configmap/kubeadm-config                                                                 kube-system  27d    
configmap/kubelet-config-1.13                                                            kube-system  27d 


endpoints:

endpoints/kube-controller-manager                                                        kube-system  27d    
endpoints/kube-dns                                                                       kube-system  27d    
endpoints/kube-scheduler                                                                 kube-system  27d 

Describe alternatives you've considered
I was basing how k get all works.
Additional context
In case of namespace with a lot of resources - there is easier visually to look at results

@grzesuav
Copy link
Author

I do not insist on specific format, I would like something which clearly distinct different resource types

@corneliusweig
Copy link
Owner

corneliusweig commented Apr 11, 2019

@grzesuav The long-term plan is to output exactly the same as k get all. However, the resource printer code is not usable by plugins so far. There is an open issue in kubernetes which will solve this in the future. So expect a major improvement in that regard at some point.

However, until then I can improve the current printer. I'm a bit reluctant to add these headings, as this is also not the way how k get all does it. Would simply an empty line work for you? This would already separate resource groups visually.

@grzesuav
Copy link
Author

Yes, definitely will be better. Could you also link here upstream issue ? Thank you :)

@corneliusweig
Copy link
Owner

@corneliusweig
Copy link
Owner

@grzesuav After trying this out, I don't think that empty lines will improve the readability of the output. For example,

$ ketall -n tiller
NAME                     NAMESPACE  AGE
endpoints/tiller-deploy  tiller     17d  

pod/tiller-deploy-777d84c777-njlx9  tiller  17d  

secret/default-token-skk9k      tiller  17d  
secret/tiller-user-token-hbqdr  tiller  17d  

serviceaccount/default      tiller  17d  
serviceaccount/tiller-user  tiller  17d  

service/tiller-deploy  tiller  17d  

deployment.apps/tiller-deploy  tiller  17d  

replicaset.apps/tiller-deploy-777d84c777  tiller  17d  

deployment.extensions/tiller-deploy  tiller  17d  

replicaset.extensions/tiller-deploy-777d84c777  tiller  17d

Which looks quite odd and does not improve readability for me. This would not change, if the header were repeated for every group.

Besides, I think that no lines in between is more in line with kubectl, for example look at the output of k get all -oname. This also prints the full resource name and has no interspersed blank lines, just as ketall.

However, I'm considering to colorize the result. That might help a bit.

@grzesuav
Copy link
Author

Yes, but I was basing on just k get all - indeed, adding -oname looks awful. Hope coloring will help.

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

2 participants