Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/elasticsearch-exporter] Add serviceMonitor targetLabels #22951

Merged
merged 1 commit into from
Jun 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/elasticsearch-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Elasticsearch stats exporter for Prometheus
name: elasticsearch-exporter
version: 3.3.0
version: 3.4.0
kubeVersion: ">=1.10.0-0"
appVersion: 1.1.0
home: https://github.com/justwatchcom/elasticsearch_exporter
Expand Down
1 change: 1 addition & 0 deletions stable/elasticsearch-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Parameter | Description | Default
`serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `10s`
`serviceMonitor.scheme` | Scheme to use for scraping | `http`
`serviceMonitor.relabelings` | Relabel configuration for the metrics | `[]`
`serviceMonitor.targetLabels` | Set of labels to transfer on the Kubernetes Service onto the target. | `[]`
`prometheusRule.enabled` | If true, a PrometheusRule CRD is created for a prometheus operator | `false`
`prometheusRule.namespace` | If set, the PrometheusRule will be installed in a different namespace | `""`
`prometheusRule.labels` | Labels for prometheus operator | `{}`
Expand Down
6 changes: 6 additions & 0 deletions stable/elasticsearch-exporter/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,10 @@ spec:
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
{{- if .Values.serviceMonitor.targetLabels }}
targetLabels:
{{- range .Values.serviceMonitor.targetLabels }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions stable/elasticsearch-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ serviceMonitor:
scrapeTimeout: 10s
scheme: http
relabelings: []
targetLabels: []

prometheusRule:
## If true, a PrometheusRule CRD is created for a prometheus operator
Expand Down