Skip to content

Commit

Permalink
feat(helm): add logFormat and logLevel params, update app version (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
burningalchemist authored Oct 26, 2024
1 parent a1726ff commit d1db481
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions helm/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 5 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d1db481

Please sign in to comment.