Skip to content

Commit

Permalink
Fix pushgateway labels honoring (helm#10728)
Browse files Browse the repository at this point in the history
* add honorLabels to Pushgateway ServiceMonitor

Signed-off-by: Idan Levin <[email protected]>

* Pushgateway chart version bump

Signed-off-by: Idan Levin <[email protected]>

* update readme

Signed-off-by: Idan Levin <[email protected]>
  • Loading branch information
idanlevin authored and k8s-ci-robot committed Jan 17, 2019
1 parent 969af5f commit 804e1f4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/prometheus-pushgateway/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions stable/prometheus-pushgateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
3 changes: 3 additions & 0 deletions stable/prometheus-pushgateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 804e1f4

Please sign in to comment.