Skip to content

Commit

Permalink
[stable/prometheus-snmp-exporter] Fix serviceMonitor params (helm#19985)
Browse files Browse the repository at this point in the history
The template for prometheus-snmp-exporter's serviceMonitor checks
for `.Values.serviceMonitor.params.enabled` but then tries to insert
`.Values.conf.params.conf` instead.

This change was already part of PR helm#18389 but that was closed due
to inactivity.

Signed-off-by: Helge Sychla <helge.sychla@travelping.com>
  • Loading branch information
hsychla authored Mar 14, 2020
1 parent ed7cd53 commit a1d9d71
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion stable/prometheus-snmp-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Prometheus SNMP Exporter
name: prometheus-snmp-exporter
version: 0.0.4
version: 0.0.5
appVersion: 0.14.0
home: https://github.com/prometheus/snmp_exporter
sources:
Expand Down
9 changes: 6 additions & 3 deletions stable/prometheus-snmp-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,13 @@ The following table lists the configurable parameters of the SNMP-Exporter chart
| `service.type` | type of service to create | `ClusterIP` |
| `service.port` | port for the snmp http service | `9116` |
| `service.externalIPs` | list of external ips | [] |
| `rbac.create` | Use Role-based Access Control | `true` |
| `serviceAccount.create` | Should we create a ServiceAccount | `true` |
| `serviceAccount.name` | Name of the ServiceAccount to use | `null` |
| `rbac.create` | Use Role-based Access Control | `true` |
| `serviceAccount.create` | Should we create a ServiceAccount | `true` |
| `serviceAccount.name` | Name of the ServiceAccount to use | `null` |
| `serviceMonitor.enabled` | Enables ServiceMonitor | `false` |
| `serviceMonitor.params.enabled` | Enables params for serviceMonitor | `false` |
| `serviceMonitor.params.conf.module` | Module to use for scrapes | `[]` |
| `serviceMonitor.params.conf.target` | List of target(s) to scrape | `[]` |


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 @@ -22,7 +22,8 @@ spec:
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.serviceMonitor.params.enabled }}
{{ toYaml .Values.conf.params.conf | indent 6 }}
params:
{{ toYaml .Values.serviceMonitor.params.conf | indent 6 }}
{{- end }}
selector:
matchLabels:
Expand Down

0 comments on commit a1d9d71

Please sign in to comment.