Closed smanpathak closed 4 years ago
Hi @smanpathak! In the latest version of the operator(v0.3.1
), it adds labels on services.
This is the list of labels on all cluster objects:
"mysql.presslabs.org/cluster": <cluster name>,
"app.kubernetes.io/name": "mysql",
"app.kubernetes.io/instance": <cluster name>,
"app.kubernetes.io/version": <mysql version>,
"app.kubernetes.io/component": "database",
"app.kubernetes.io/managed-by": "mysql.presslabs.org",
We can backport this feature in version 0.2.x
, if you need it.
@AMecea v0.3.1 should work for us.
Thanks,
We are trying to use prometheus-operator to scrape mysql metrics for myql instances. Prometheus operator uses a custom resource called ServiceMonitor to link application metrics to a prometheus instance. It identifies the applications to scrape by using label selectors like a service object. To discover mysql instances with prometheus operator, the nodes service need to have labels on it. Can the operator apply some labels like app=mysql-operator and mysql_cluster=? That should be sufficient.