From a1d9d71aed59037925f35d41a2ead05173664bd7 Mon Sep 17 00:00:00 2001 From: Helge Sychla Date: Sat, 14 Mar 2020 14:52:34 +0100 Subject: [PATCH] [stable/prometheus-snmp-exporter] Fix serviceMonitor params (#19985) 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 #18389 but that was closed due to inactivity. Signed-off-by: Helge Sychla --- stable/prometheus-snmp-exporter/Chart.yaml | 2 +- stable/prometheus-snmp-exporter/README.md | 9 ++++++--- .../templates/servicemonitor.yaml | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/stable/prometheus-snmp-exporter/Chart.yaml b/stable/prometheus-snmp-exporter/Chart.yaml index dcd0ce82cf..d99f47f769 100644 --- a/stable/prometheus-snmp-exporter/Chart.yaml +++ b/stable/prometheus-snmp-exporter/Chart.yaml @@ -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: diff --git a/stable/prometheus-snmp-exporter/README.md b/stable/prometheus-snmp-exporter/README.md index 4ba468367e..da4754431d 100644 --- a/stable/prometheus-snmp-exporter/README.md +++ b/stable/prometheus-snmp-exporter/README.md @@ -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, diff --git a/stable/prometheus-snmp-exporter/templates/servicemonitor.yaml b/stable/prometheus-snmp-exporter/templates/servicemonitor.yaml index 9e467a3f80..0bcbb931d1 100644 --- a/stable/prometheus-snmp-exporter/templates/servicemonitor.yaml +++ b/stable/prometheus-snmp-exporter/templates/servicemonitor.yaml @@ -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: