Add relabelings config for node-exporter ServiceMonitor (#22764)

Signed-off-by: Hong Shick Pak <hong@hspak.com>
This commit is contained in:
Hong Shick Pak
2020-06-16 01:26:03 -07:00
committed by GitHub
parent 6e997271b2
commit 38a8dff984
4 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
appVersion: 1.0.0
description: A Helm chart for prometheus node-exporter
name: prometheus-node-exporter
version: 1.10.0
version: 1.11.0
home: https://github.com/prometheus/node_exporter/
sources:
- https://github.com/prometheus/node_exporter/
@@ -67,6 +67,7 @@ The following table lists the configurable parameters of the Node Exporter chart
| `prometheus.monitor.enabled` | Set this to `true` to create ServiceMonitor for Prometheus operator | `false` |
| `prometheus.monitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` |
| `prometheus.monitor.namespace` | namespace where servicemonitor resource should be created | `the same namespace as prometheus node exporter` |
| `prometheus.monitor.relabelings` | Relabelings that should be applied on the ServerMonitor | `{}` |
| `prometheus.monitor.scrapeTimeout` | Timeout after which the scrape is ended | `10s` |
| `configmaps` | Allow mounting additional configmaps. | `[]` |
| `namespaceOverride` | Override the deployment namespace | `""` (`Release.Namespace`) |
@@ -18,4 +18,8 @@ spec:
{{- if .Values.prometheus.monitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }}
{{- end }}
{{- if .Values.prometheus.monitor.relabelings }}
relabelings:
{{ toYaml .Values.prometheus.monitor.relabelings | indent 6 }}
{{- end }}
{{- end }}
@@ -21,6 +21,7 @@ prometheus:
additionalLabels: {}
namespace: ""
relabelings: []
scrapeTimeout: 10s
## Customize the updateStrategy if set