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

Need to get just one type resource #12

Closed
kotarusv opened this issue Aug 16, 2021 · 1 comment
Closed

Need to get just one type resource #12

kotarusv opened this issue Aug 16, 2021 · 1 comment

Comments

@kotarusv
Copy link

This script is very useful. I been looking for quite some to list unused PVC, not being used in any pods. I don't find any solution so far. I found this script is super helpful in what am looking for. However, It would be nice if script takes 1 or more arguments to print just a specific type of resource.
For example, I want to just print unused PVC, not interested in other resources. This helps

  1. Script doesn't have to fetch every resource which is not interested. fewer API calls to cluster
  2. Easy to get information rather than searching in big list of all the resources

Srinivas Kotaru

@yogeshkk
Copy link
Owner

Thanks a lot @kotarusv

There are two parts.

  1. I am trying to do as few API calls as possible. There is only one big API call(list pod) and I am extracting Secret, CM, PVC, and SA from it. So if I add this flag you won't see any significant improvement in time. Only people interested in others can see significant improvement.

  2. User experience. When new users try to run the script they don't need to know all the parameters they have to provide to get the correct output. They can just run the script and they will get output. So even if I have to add such parameter it will be for power user mean it will exclude flag and you have to exclude all but the one you interested in. This again makes the life of the power user difficult so I am trying to avoid the same.

I did try to make the output nice let me know if I can improve it further also ideally If you have the big output that case of concern. Also, I have added Prometheus integration for such output you can check in Prometheus or in Grafana to view them nicely.

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