From e7b9c26902dc254e4b95bbad300ece7f6c58a221 Mon Sep 17 00:00:00 2001 From: Calvin Bui <3604363+calvinbui@users.noreply.github.com> Date: Tue, 28 Jul 2020 01:20:18 +1000 Subject: [PATCH] [stable/prometheus-mongodb-exporter] Add ServiceMonitor metricRelabelings (#23290) Signed-off-by: Calvin Bui <3604363+calvinbui@users.noreply.github.com> --- stable/prometheus-mongodb-exporter/Chart.yaml | 2 +- stable/prometheus-mongodb-exporter/README.md | 1 + .../prometheus-mongodb-exporter/templates/servicemonitor.yaml | 3 +++ stable/prometheus-mongodb-exporter/values.yaml | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/stable/prometheus-mongodb-exporter/Chart.yaml b/stable/prometheus-mongodb-exporter/Chart.yaml index da8cf040cf..781e0bb24b 100644 --- a/stable/prometheus-mongodb-exporter/Chart.yaml +++ b/stable/prometheus-mongodb-exporter/Chart.yaml @@ -13,4 +13,4 @@ maintainers: name: prometheus-mongodb-exporter sources: - https://github.com/percona/mongodb_exporter -version: 2.7.0 +version: 2.8.0 diff --git a/stable/prometheus-mongodb-exporter/README.md b/stable/prometheus-mongodb-exporter/README.md index 98387dc792..60dae784a9 100644 --- a/stable/prometheus-mongodb-exporter/README.md +++ b/stable/prometheus-mongodb-exporter/README.md @@ -66,4 +66,5 @@ podAnnotations: | `serviceMonitor.namespace` | The namespace where the Prometheus Operator is deployed | `` | | `serviceMonitor.additionalLabels` | Additional labels to add to the ServiceMonitor | `{}` | | `serviceMonitor.targetLabels` | Set of labels to transfer on the Kubernetes Service onto the target. | `[]` +| `serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion. | `[]` | | `tolerations` | List of node taints to tolerate | `[]` | diff --git a/stable/prometheus-mongodb-exporter/templates/servicemonitor.yaml b/stable/prometheus-mongodb-exporter/templates/servicemonitor.yaml index 17939ecdf0..e168dc2495 100644 --- a/stable/prometheus-mongodb-exporter/templates/servicemonitor.yaml +++ b/stable/prometheus-mongodb-exporter/templates/servicemonitor.yaml @@ -19,6 +19,9 @@ spec: - port: metrics interval: {{ .Values.serviceMonitor.interval }} scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} + {{- if .Values.serviceMonitor.metricRelabelings }} + metricRelabelings: {{ toYaml .Values.serviceMonitor.metricRelabelings | nindent 4 }} + {{- end }} namespaceSelector: matchNames: - {{ .Release.Namespace }} diff --git a/stable/prometheus-mongodb-exporter/values.yaml b/stable/prometheus-mongodb-exporter/values.yaml index 32fc30a5b3..446e2a0775 100644 --- a/stable/prometheus-mongodb-exporter/values.yaml +++ b/stable/prometheus-mongodb-exporter/values.yaml @@ -93,5 +93,6 @@ serviceMonitor: namespace: additionalLabels: {} targetLabels: [] + metricRelabelings: [] tolerations: []