-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
improve ListClusters #27
Comments
What kind of design are we looking for for this output? We get a lot of information back from the API for each stack, and for the cluster. |
I think something similar to |
@stefanprodan did you say that you wanted to fix this? It'd be nice to fix before 0.1.0-beta.1. |
I'll make it less verbose for beta.1, so it's a bit more useful! |
Make `eksctl get clusters` less verbose (#27)
@errordeveloper i've been looking into this. Paginating through the list of clusters with ListClusters is easy enough. Its a shame that this only returns the cluster name. It would've been great if it returned summary information as well as it could potentially save subsequent calls to DescribeCluster. If only there was a ListClustersWithSummary endpoint! So the logic is:
So there could be a lot of calls in a short space of time to the AWS endpoints if this is used with an account that has a lot of EKS clusters. If we have 100 clusters and running in debug log level then it will make 201 requests. With the data that is returned we'll run it through a printer to format the output of the data. The printers will be based on an interface so in the future we can support different outputs (i.e. table, json, yaml). Is that what you where thinking? |
Yeah, mostly that's what I was thinking indeed... But now I think more, and maybe we could make it even simpler. And by the way, I wouldn't be too worried about API calls, most people probably won't have more then a few clusters (as default limit is still 3 clusters per account). But whatever we will do now will change when we move to CloudFormation, and many things maybe become easier then as we would have describe stacks with outputs (which supports all sorts of options). Maybe we could make We would probably want |
Sounds like a good plan to start with. |
Closed via #140. |
🎉 🌮 🎉 🌮 🎉 🌮 |
Fixes: eksctl-io#27
It will fail if a user has many clusters, so it needs paging.
https://github.com/weaveworks/eksctl/blob/0a39d1a2c1d107e1da90c27889d43bddba42ab3a/pkg/eks/eks.go#L128
It should also use data structure and a formatter instead of using logger.
https://github.com/weaveworks/eksctl/blob/0a39d1a2c1d107e1da90c27889d43bddba42ab3a/pkg/eks/eks.go#L127
The text was updated successfully, but these errors were encountered: