diff --git a/stable/prometheus-pushgateway/Chart.yaml b/stable/prometheus-pushgateway/Chart.yaml index 34d943d5f323..fdae63b8570a 100644 --- a/stable/prometheus-pushgateway/Chart.yaml +++ b/stable/prometheus-pushgateway/Chart.yaml @@ -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 diff --git a/stable/prometheus-pushgateway/README.md b/stable/prometheus-pushgateway/README.md index 056aa3d7aff9..9a734c889d43 100644 --- a/stable/prometheus-pushgateway/README.md +++ b/stable/prometheus-pushgateway/README.md @@ -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, diff --git a/stable/prometheus-pushgateway/templates/servicemonitor.yaml b/stable/prometheus-pushgateway/templates/servicemonitor.yaml index 0c25fa89040c..2de77f68d8bd 100644 --- a/stable/prometheus-pushgateway/templates/servicemonitor.yaml +++ b/stable/prometheus-pushgateway/templates/servicemonitor.yaml @@ -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" . }} diff --git a/stable/prometheus-pushgateway/values.yaml b/stable/prometheus-pushgateway/values.yaml index 9900bda6e2e9..cc06ed09bddd 100644 --- a/stable/prometheus-pushgateway/values.yaml +++ b/stable/prometheus-pushgateway/values.yaml @@ -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