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

Created on 6 Jun 2019  路  3Comments  路  Source: helm/charts

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

Most helpful comment

All 3 comments

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

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

Was this page helpful?
0 / 5 - 0 ratings