Fix pushgateway labels honoring (#10728)

* add honorLabels to Pushgateway ServiceMonitor

Signed-off-by: Idan Levin <idlevin@microsoft.com>

* Pushgateway chart version bump

Signed-off-by: Idan Levin <idlevin@microsoft.com>

* update readme

Signed-off-by: Idan Levin <idlevin@microsoft.com>
This commit is contained in:
Idan
2019-01-17 05:04:04 -08:00
committed by Kubernetes Prow Robot
parent 969af5f7ac
commit 804e1f4a2a
4 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.6.0"
description: A Helm chart for prometheus pushgateway
name: prometheus-pushgateway
version: 0.2.0
version: 0.3.0
home: https://github.com/prometheus/pushgateway
sources:
- https://github.com/prometheus/pushgateway
+1
View File
@@ -66,6 +66,7 @@ The following table lists the configurable parameters of the pushgateway chart a
| `serviceMonitor.namespace` | Namespace which Prometheus is running in | `monitoring` |
| `serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` |
| `serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` |
| `serviceMonitor.honorLabels`| if `true`, label conflicts are resolved by keeping label values from the scraped data | `true` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
@@ -16,6 +16,7 @@ spec:
{{- if .Values.serviceMonitor.interval }}
interval: {{ .Values.serviceMonitor.interval }}
{{- end }}
honorLabels: {{ .Values.serviceMonitor.honorLabels }}
selector:
matchLabels:
app: {{ template "prometheus-pushgateway.name" . }}
@@ -100,3 +100,6 @@ serviceMonitor:
## [Kube Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#exporters)
selector:
prometheus: kube-prometheus
# Retain the job and instance labels of the metrics pushed to the Pushgateway
# [Scraping Pushgateway](https://github.com/prometheus/pushgateway#configure-the-pushgateway-as-a-target-to-scrape)
honorLabels: true