From d1db481be0250555b92e886b01a4c3ce7c1abb2a Mon Sep 17 00:00:00 2001 From: Sergei Zyubin Date: Sat, 26 Oct 2024 10:53:53 +0200 Subject: [PATCH] feat(helm): add logFormat and logLevel params, update app version (#623) --- helm/Chart.yaml | 4 ++-- helm/README.md | 6 ++++-- helm/templates/deployment.yaml | 2 ++ helm/values.yaml | 6 +++++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 13b8c24b..8f395ebe 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: sql-exporter description: Database-agnostic SQL exporter for Prometheus type: application -version: 0.8.0 -appVersion: 0.15.0 +version: 0.9.0 +appVersion: 0.16.0 keywords: - exporter - servicemonitor diff --git a/helm/README.md b/helm/README.md index cf278cd6..d7770f49 100644 --- a/helm/README.md +++ b/helm/README.md @@ -1,6 +1,6 @@ # sql-exporter -![Version: 0.8.0](https://img.shields.io/badge/Version-0.8.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.15.0](https://img.shields.io/badge/AppVersion-0.15.0-informational?style=flat-square) +![Version: 0.9.0](https://img.shields.io/badge/Version-0.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.16.0](https://img.shields.io/badge/AppVersion-0.16.0-informational?style=flat-square) Database-agnostic SQL exporter for Prometheus @@ -50,7 +50,9 @@ helm install sql_exporter/sql-exporter | podLabels | object | `{}` | Pod labels | | podAnnotations | object | `{}` | Pod annotations | | podSecurityContext | object | `{}` | Pod security context | -| createConfig | bool | `true` | | +| createConfig | bool | `true` | Set to true to create a config as a part of the helm chart | +| logLevel | string | `"debug"` | Set log level (info if unset) | +| logFormat | string | `"logfmt"` | Set log format (logfmt if unset) | | reloadEnabled | bool | `false` | Enable reload collector data handler (endpoint /reload) | ### Prometheus ServiceMonitor diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 3b80f46b..f8ed4518 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -55,6 +55,8 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} args: - "-config.file=/etc/sql_exporter/sql_exporter.yml" + - "-log.level={{ .Values.logLevel | default "info" }}" + - "-log.format={{ .Values.logFormat | default "logfmt" }}" {{- if .Values.reloadEnabled }} - "-web.enable-reload" {{- end }} diff --git a/helm/values.yaml b/helm/values.yaml index 235d4d63..036aa5a0 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -115,8 +115,12 @@ serviceMonitor: # mount: # readOnly: true # mountPath: /etc/config -# Set to true to create a config as a part of the helm chart +# -- Set to true to create a config as a part of the helm chart createConfig: true +# -- Set log level (info if unset) +logLevel: debug +# -- Set log format (logfmt if unset) +logFormat: logfmt # -- Enable reload collector data handler (endpoint /reload) reloadEnabled: false config: