Skip to content

Commit

Permalink
[stable/elasticsearch-exporter] Add serviceMonitor targetLabels (helm…
Browse files Browse the repository at this point in the history
…#22951)

Signed-off-by: Calvin Bui <[email protected]>
Signed-off-by: camelusluo <[email protected]>
  • Loading branch information
calvinbui authored and camelusluo committed Jul 6, 2020
1 parent 4edec28 commit f5c4550
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
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

0 comments on commit f5c4550

Please sign in to comment.