robusta-dev / krr

Prometheus-based Kubernetes Resource Recommendations
MIT License
2.51k stars 140 forks source link

Custom selector for prometheus service auto discovery #303

Open mrueg opened 1 week ago

mrueg commented 1 week ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

The auto discovery of prometheus uses hardcoded labels which just gets longer and longer.

Describe the solution you'd like A clear and concise description of what you want to happen.

Allow the user to specify selectors that point to the right service.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. Forking the repo Are you interested in contributing a PR for this? Yes/no. If yes, we will provide guidance what parts of the code to modify and help you. Not sure yet. Additional context Add any other context or screenshots about the feature request here.

aantn commented 1 week ago

Hi @mrueg, we are open to a PR for this! Absolutely.

aantn commented 1 week ago

It would be best to base the PR on the prometheus-workload-loader branch which has some major changes that will be merged soon.

aantn commented 1 week ago

One more thing: note that as a workaround you may be able to use --prometheus-url