cloudworkz / kube-eagle

A prometheus exporter created to provide a better overview of your resource allocation and utilization in a Kubernetes cluster.
MIT License
703 stars 46 forks source link

Add option to exclude completed pods? #32

Open apsega opened 4 years ago

apsega commented 4 years ago

Hi,

We're facing an issue when we have lots of completed pods:

# kubectl get pods --all-namespaces | grep -i completed | wc -l
   11863

And kube-eagle struggles to iterate over that many objects and therefore Kubernetes control plane crashes:

Screenshot 2020-03-18 at 14 14 22

Is there a way to exclude pods in completed state?

weeco commented 4 years ago

Hi @apsega , as of now there's no such option. I'd draft this issue as feature request to exclude pods from scraping with specific conditions:

This way it is a bit more generic and may help with slightly different use cases as well. PRs are welcome. I don't think I'll work on that in the near future.