diff --git a/helm/Chart.yaml b/helm/Chart.yaml index a4ef399b..03443dad 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: sql-exporter description: Database agnostic SQL exporter for Prometheus type: application -version: 0.4.0 +version: 0.4.1 appVersion: 0.14.0 keywords: - exporter diff --git a/helm/README.md b/helm/README.md index a9d5e97a..8a8db77e 100644 --- a/helm/README.md +++ b/helm/README.md @@ -1,6 +1,6 @@ # sql-exporter -![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.14.0](https://img.shields.io/badge/AppVersion-0.14.0-informational?style=flat-square) +![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.14.0](https://img.shields.io/badge/AppVersion-0.14.0-informational?style=flat-square) Database agnostic SQL exporter for Prometheus @@ -52,6 +52,7 @@ helm install sql_exporter/sql-exporter | serviceMonitor.enabled | bool | `true` | Enable ServiceMonitor | | serviceMonitor.interval | string | `"15s"` | ServiceMonitor interval | | serviceMonitor.path | string | `"/metrics"` | ServiceMonitor path | +| serviceMonitor.metricRelabelings | object | `{}` | ServiceMonitor metric relabelings | | serviceMonitor.scrapeTimeout | string | `nil` | ServiceMonitor scrape timeout | ### Configuration diff --git a/helm/templates/servicemonitor.yaml b/helm/templates/servicemonitor.yaml index 208e520a..47af3bc1 100644 --- a/helm/templates/servicemonitor.yaml +++ b/helm/templates/servicemonitor.yaml @@ -28,6 +28,10 @@ spec: {{- if .Values.serviceMonitor.scrapeTimeout }} scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} {{- end }} + {{- if .Values.serviceMonitor.metricRelabelings }} + metricRelabelings: + {{- toYaml .Values.serviceMonitor.metricRelabelings | nindent 8 }} + {{- end }} namespaceSelector: matchNames: - {{ .Release.Namespace }} diff --git a/helm/values.yaml b/helm/values.yaml index 01329a5c..df722261 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -66,6 +66,8 @@ serviceMonitor: path: /metrics # -- ServiceMonitor scrape timeout # scrapeTimeout: 10s + # -- ServiceMonitor metric relabelings + metricRelabelings: {} # Additional env variables # - kind should be either Secret or ConfigMap