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 option for json output #10
Comments
You can run this in K8s as deployment via below
Then It will continue to run in background and exporting metrics such under "k8s_unused_resources". You can configure Prometheus to scrape it refer this. Once metrics started appearing in Promethues you can add alert rule in Prometheus to send alert to respective stakeholder. (I will add few sample rule as soon as possible). Also you can Grafana dashboard(provided under deploy/k8sPurger Dashboard.json) which can show you all unused resource in each namespace. Sample metrics is as below |
Awesome. Thanks for the detailed reply. However, instead of going through additional steps like the above, it might be easier still to have a |
I have integrated with Prometheus as Prometheus has emerged as the de-facto open-source standard for monitoring Kubernetes. If you have Prometheus you have zero configuration just need to add alerts. The nice box output is generated by me. So adding -o json is a bit of effort from my side also people need to add their logic to get json output process to send an alert. I am not sure how many people are ready to put that effort so I will keep this issue open if we see traction on this issue will implement the same. |
Cool tool!!
This will enable running K8Spurger as a Cronjob (or Jenkins a job) periodically and do some additional processing of the output. E.g. Send notifications to namespace owners about unused resources in their namespace.
The text was updated successfully, but these errors were encountered: