From aa6f291826557a124c233456efed645b62ed7fd2 Mon Sep 17 00:00:00 2001 From: Calvin Bui <3604363+calvinbui@users.noreply.github.com> Date: Wed, 22 Jul 2020 12:33:54 +1000 Subject: [PATCH] [stable/elasticsearch-exporter] Add ServiceMonitor metricRelabeling Signed-off-by: Calvin Bui <3604363+calvinbui@users.noreply.github.com> --- stable/elasticsearch-exporter/Chart.yaml | 2 +- stable/elasticsearch-exporter/README.md | 1 + stable/elasticsearch-exporter/templates/servicemonitor.yaml | 4 ++++ stable/elasticsearch-exporter/values.yaml | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/stable/elasticsearch-exporter/Chart.yaml b/stable/elasticsearch-exporter/Chart.yaml index 4bff7f45eee5..3621c66852b9 100644 --- a/stable/elasticsearch-exporter/Chart.yaml +++ b/stable/elasticsearch-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Elasticsearch stats exporter for Prometheus name: elasticsearch-exporter -version: 3.5.0 +version: 3.6.0 kubeVersion: ">=1.10.0-0" appVersion: 1.1.0 home: https://github.com/justwatchcom/elasticsearch_exporter diff --git a/stable/elasticsearch-exporter/README.md b/stable/elasticsearch-exporter/README.md index d5a0536f6798..8f38d927aa1d 100644 --- a/stable/elasticsearch-exporter/README.md +++ b/stable/elasticsearch-exporter/README.md @@ -102,6 +102,7 @@ Parameter | Description | Default `serviceMonitor.scheme` | Scheme to use for scraping | `http` `serviceMonitor.relabelings` | Relabel configuration for the metrics | `[]` `serviceMonitor.targetLabels` | Set of labels to transfer on the Kubernetes Service onto the target. | `[]` +`serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion. | `[]` `prometheusRule.enabled` | If true, a PrometheusRule CRD is created for a prometheus operator | `false` `prometheusRule.namespace` | If set, the PrometheusRule will be installed in a different namespace | `""` `prometheusRule.labels` | Labels for prometheus operator | `{}` diff --git a/stable/elasticsearch-exporter/templates/servicemonitor.yaml b/stable/elasticsearch-exporter/templates/servicemonitor.yaml index 3c349a68b48c..ab27693a556e 100644 --- a/stable/elasticsearch-exporter/templates/servicemonitor.yaml +++ b/stable/elasticsearch-exporter/templates/servicemonitor.yaml @@ -29,6 +29,10 @@ spec: relabelings: {{- toYaml .Values.serviceMonitor.relabelings | nindent 4 }} {{- end }} + {{- if .Values.serviceMonitor.metricRelabelings }} + metricRelabelings: + {{ toYaml .Values.serviceMonitor.metricRelabelings | nindent 4 }} + {{- end }} jobLabel: "{{ .Release.Name }}" selector: matchLabels: diff --git a/stable/elasticsearch-exporter/values.yaml b/stable/elasticsearch-exporter/values.yaml index 453deef28cf8..9b8d524c6788 100644 --- a/stable/elasticsearch-exporter/values.yaml +++ b/stable/elasticsearch-exporter/values.yaml @@ -172,6 +172,7 @@ serviceMonitor: scheme: http relabelings: [] targetLabels: [] + metricRelabelings: [] prometheusRule: ## If true, a PrometheusRule CRD is created for a prometheus operator