Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/prometheus-mysql-exporter] Add support for Prometheus Operator's ServiceMonitor #14563

Closed
tklovett opened this issue Jun 6, 2019 · 3 comments · Fixed by #14600
Closed

Comments

@tklovett
Copy link
Contributor

tklovett commented Jun 6, 2019

I would like to add a ServiceMonitor to stable/prometheus-mysql-exporter. The current discovery mechanism (prometheus.io/scrape), doesn't work for the common Prometheus Operator setup. From what I can tell, coreos/kube-prometheus hasn't supported this annotation-driven mechanism since ~2017.

Is your feature request related to a problem? Please describe.
Yes, this chart is not compatible out-of-the-box with Prometheus Operator. I would need to write an additional chart to add a ServiceMonitor for this Deployment.

Describe the solution you'd like
I would like to add a monitoring.coreos.com ServiceMonitor. It will selector.matchLabels on app: {{ template "prometheus-mysql-exporter.name" . }}.

Optionally, I could remove the prometheus.io/* default annotations. This would be a breaking change, but there may not be many users affected. Perhaps it would make sense to do that in a separate PR.

Describe alternatives you've considered

Roll My Own

I could roll my own chart which creates a ServiceMonitor. It could be installed alongside stable/prometheus-mysql-exporter or wrap it with a dependency. However, this makes our configuration slightly more complicated, and doesn't allow the community to benefit from my work.

/cc past contributors @monotek @Tarick @estahn @Juanchimienti

@tklovett
Copy link
Contributor Author

tklovett commented Jun 6, 2019

I'll put up a PR soon, hopefully today.

@tklovett
Copy link
Contributor Author

tklovett commented Jun 6, 2019

Prometheus exporter charts with existing support for ServiceMonitor:

tklovett added a commit to tklovett/charts that referenced this issue Jun 7, 2019
tklovett added a commit to tklovett/charts that referenced this issue Jun 7, 2019
tklovett added a commit to tklovett/charts that referenced this issue Jun 7, 2019
tklovett added a commit to tklovett/charts that referenced this issue Jun 7, 2019
@norwoodj
Copy link
Contributor

norwoodj commented Jun 7, 2019

We have had to create a separate chart to add a servicemonitor that interoperates with this chart. This would be a very welcome addition.

tklovett added a commit to tklovett/charts that referenced this issue Jun 12, 2019
tklovett added a commit to tklovett/charts that referenced this issue Jun 19, 2019
tklovett added a commit to tklovett/charts that referenced this issue Jun 21, 2019
anasinnyk pushed a commit to MacPaw/charts that referenced this issue Jun 29, 2019
davidkarlsen pushed a commit to davidkarlsen/charts that referenced this issue Jul 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants