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

Commit

Permalink
[stable/prometheus-node-exporter] add scrapeTimeout for the service m…
Browse files Browse the repository at this point in the history
…onitor (#14293)

Signed-off-by: Ryan Belgrave <[email protected]>
  • Loading branch information
Ryan Belgrave authored and k8s-ci-robot committed Jun 27, 2019
1 parent 291ccbb commit 049be7b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/prometheus-node-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.18.0"
description: A Helm chart for prometheus node-exporter
name: prometheus-node-exporter
version: 1.5.0
version: 1.5.1
home: https://github.com/prometheus/node_exporter/
sources:
- https://github.com/prometheus/node_exporter/
Expand Down
1 change: 1 addition & 0 deletions stable/prometheus-node-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ The following table lists the configurable parameters of the Node Exporter chart
| `prometheus.monitor.enabled` | Set this to `true` to create ServiceMonitor for Prometheus operator | `false` | |
| `prometheus.monitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` | |
| `prometheus.monitor.namespace` | namespace where servicemonitor resource should be created | `the same namespace as prometheus node exporter` | |
| `prometheus.monitor.scrapeTimeout` | Timeout after which the scrape is ended | `10s` | |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

Expand Down
3 changes: 3 additions & 0 deletions stable/prometheus-node-exporter/templates/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ spec:
release: {{ .Release.Name }}
endpoints:
- port: metrics
{{- if .Values.prometheus.monitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions stable/prometheus-node-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ prometheus:
additionalLabels: {}
namespace: ""

scrapeTimeout: 10s

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down

0 comments on commit 049be7b

Please sign in to comment.