diff --git a/stable/prometheus-redis-exporter/Chart.yaml b/stable/prometheus-redis-exporter/Chart.yaml index 4783452226..7ba489a2f5 100644 --- a/stable/prometheus-redis-exporter/Chart.yaml +++ b/stable/prometheus-redis-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 1.0.4 description: Prometheus exporter for Redis metrics name: prometheus-redis-exporter -version: 3.1.0 +version: 3.2.0 home: https://github.com/oliver006/redis_exporter sources: - https://github.com/oliver006/redis_exporter diff --git a/stable/prometheus-redis-exporter/README.md b/stable/prometheus-redis-exporter/README.md index 3cf5f66607..7c0fc120ab 100644 --- a/stable/prometheus-redis-exporter/README.md +++ b/stable/prometheus-redis-exporter/README.md @@ -66,6 +66,7 @@ The following table lists the configurable parameters and their default values. | `serviceMonitor.telemetryPath` | Path to redis-exporter telemtery-path | | | `serviceMonitor.labels` | Labels for the servicemonitor passed to Prometheus Operator | `{}` | | `serviceMonitor.timeout` | Timeout after which the scrape is ended | | +| `serviceMonitor.targetLabels` | Set of labels to transfer on the Kubernetes Service onto the target. | | | `script.configmap` | Let you run a custom lua script from a configmap. The corresponding environment variable `REDIS_EXPORTER_SCRIPT` will be set automatically || | `script.keyname` | Name of the key inside configmap which contains your script || diff --git a/stable/prometheus-redis-exporter/templates/servicemonitor.yaml b/stable/prometheus-redis-exporter/templates/servicemonitor.yaml index f503da32f8..b41fd6cb17 100644 --- a/stable/prometheus-redis-exporter/templates/servicemonitor.yaml +++ b/stable/prometheus-redis-exporter/templates/servicemonitor.yaml @@ -31,5 +31,11 @@ spec: matchLabels: app: {{ template "prometheus-redis-exporter.name" . }} release: {{ .Release.Name }} +{{- if .Values.serviceMonitor.targetLabels }} +{{- range .Values.serviceMonitor.targetLabels }} + targetLabels: + - {{ . }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/stable/prometheus-redis-exporter/values.yaml b/stable/prometheus-redis-exporter/values.yaml index 8bab250bc9..439d8c5c38 100644 --- a/stable/prometheus-redis-exporter/values.yaml +++ b/stable/prometheus-redis-exporter/values.yaml @@ -51,6 +51,8 @@ serviceMonitor: # labels: # Set timeout for scrape # timeout: 10s + # Set of labels to transfer on the Kubernetes Service onto the target. + # targetLabels: [] # Used to mount a LUA-Script via config map and use it for metrics-collection # script: