From 01d380a3581895d2362f21e0b8b61ba34a19554a Mon Sep 17 00:00:00 2001 From: Luca Prete Date: Sat, 18 Apr 2020 08:15:56 +0200 Subject: [PATCH] [#21968] Prometheus operator ServiceMonitor discovery docs improvement (#21982) * [#21968] Prometheus operator ServiceMonitor discovery docs improvement Signed-off-by: Luca Prete * Bump up chart version Signed-off-by: Luca Prete --- stable/prometheus-operator/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stable/prometheus-operator/README.md b/stable/prometheus-operator/README.md index 76a3a19e2c..c8e384e741 100644 --- a/stable/prometheus-operator/README.md +++ b/stable/prometheus-operator/README.md @@ -129,6 +129,9 @@ If this error has already been encountered, a `helm history` command can be used ## prometheus.io/scrape The prometheus operator does not support annotation-based discovery of services, using the `serviceMonitor` CRD in its place as it provides far more configuration options. For information on how to use servicemonitors, please see the documentation on the coreos/prometheus-operator documentation here: [Running Exporters](https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/running-exporters.md) +By default, Prometheus discovers ServiceMonitors within its namespace, that are labeled with the same release tag as the prometheus-operator release. +Sometimes, you may need to discover custom ServiceMonitors, for example used to scrape data from third-party applications. An easy way of doing this, without compromising the default ServiceMonitors discovery, is allowing Prometheus to discover all ServiceMonitors within its namespace, without applying label filtering. To do so, you can set `prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues` to `false`. + ## Configuration The following tables list the configurable parameters of the prometheus-operator chart and their default values.