From ece860199b7689c38f138b7e98d62fb68c025c4f Mon Sep 17 00:00:00 2001 From: Sheogorath <sheogorath@shivering-isles.com> Date: Sun, 8 Oct 2023 03:37:56 +0200 Subject: [PATCH] fix(nut-exporter): Fix various syntax errors --- charts/nut-exporter/Chart.yaml | 2 +- charts/nut-exporter/README.md | 4 ++-- charts/nut-exporter/dashboards/default.json | 2 +- .../nut-exporter/tests/__snapshot__/snapshot_test.yaml.snap | 4 ++-- charts/nut-exporter/values.yaml | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/nut-exporter/Chart.yaml b/charts/nut-exporter/Chart.yaml index 1a41ac1b4..167407d7f 100644 --- a/charts/nut-exporter/Chart.yaml +++ b/charts/nut-exporter/Chart.yaml @@ -13,5 +13,5 @@ sources: - https://github.com/acolombier/nut_exporter/tree/feat/add-helm-chart type: application -version: 0.3.5 +version: 0.3.6 appVersion: 3.0.0 diff --git a/charts/nut-exporter/README.md b/charts/nut-exporter/README.md index 41c576771..2d85b2741 100644 --- a/charts/nut-exporter/README.md +++ b/charts/nut-exporter/README.md @@ -1,6 +1,6 @@ # nut-exporter -   +   Installs NUT exporter in Kubernetes @@ -21,7 +21,7 @@ Installs NUT exporter in Kubernetes | image.repository | string | `"ghcr.io/druggeri/nut_exporter"` | | | image.tag | string | `""` | | | nodeSelector | object | `{}` | | -| podMonitor | object | `{"enabled":true,"labels":{},"params":{},"relabelings":[{"source_labels":["__param_ups"],"target_label":"ups"}]}` | Enables podMonitor object for prometheus-operator based setups | +| podMonitor | object | `{"enabled":true,"labels":{},"params":{},"relabelings":[{"sourceLabels":["__param_ups"],"targetLabel":"ups"}]}` | Enables podMonitor object for prometheus-operator based setups | | podMonitor.params | object | `{}` | parameters that are used on the scrape target required for functional dashboard | | podSecurityContext.runAsGroup | int | `3642` | | | podSecurityContext.runAsNonRoot | bool | `true` | | diff --git a/charts/nut-exporter/dashboards/default.json b/charts/nut-exporter/dashboards/default.json index 5d9b12034..58c06bfae 100755 --- a/charts/nut-exporter/dashboards/default.json +++ b/charts/nut-exporter/dashboards/default.json @@ -431,7 +431,7 @@ "type": "prometheus", "uid": "${datasource}" }, - "expr": "min by (ups) (network_ups_tools_battery_runtime{ups=\"$ups\")}", + "expr": "min by (ups) (network_ups_tools_battery_runtime{ups=\"$ups\"})", "interval": "", "legendFormat": "", "refId": "A" diff --git a/charts/nut-exporter/tests/__snapshot__/snapshot_test.yaml.snap b/charts/nut-exporter/tests/__snapshot__/snapshot_test.yaml.snap index 117eaddc6..cd7d3cbc7 100644 --- a/charts/nut-exporter/tests/__snapshot__/snapshot_test.yaml.snap +++ b/charts/nut-exporter/tests/__snapshot__/snapshot_test.yaml.snap @@ -106,9 +106,9 @@ should match basic snapshot: path: /ups_metrics port: http relabelings: - - source_labels: + - sourceLabels: - __param_ups - target_label: ups + targetLabel: ups scheme: http selector: matchLabels: diff --git a/charts/nut-exporter/values.yaml b/charts/nut-exporter/values.yaml index ca99461cc..4729967c5 100644 --- a/charts/nut-exporter/values.yaml +++ b/charts/nut-exporter/values.yaml @@ -14,8 +14,8 @@ podMonitor: enabled: true labels: {} relabelings: - - source_labels: [__param_ups] - target_label: ups + - sourceLabels: [__param_ups] + targetLabel: ups # -- parameters that are used on the scrape target required for functional dashboard params: {} # ups: -- GitLab