Skip to content

Commit

Permalink
feat(helm): add ability to activate -web.enable-reload flag (#606)
Browse files Browse the repository at this point in the history
* Update README.md

* Update deployment.yaml

* Update values.yaml

* bump helm chart and rename reload-prop
  • Loading branch information
Brice187 authored Oct 14, 2024
1 parent 131c783 commit 0833fd9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: sql-exporter
description: Database-agnostic SQL exporter for Prometheus
type: application
version: 0.7.0
version: 0.8.0
appVersion: 0.15.0
keywords:
- exporter
Expand Down
3 changes: 2 additions & 1 deletion helm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# sql-exporter

![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.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.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)

Database-agnostic SQL exporter for Prometheus

Expand Down Expand Up @@ -51,6 +51,7 @@ helm install sql_exporter/sql-exporter
| podAnnotations | object | `{}` | Pod annotations |
| podSecurityContext | object | `{}` | Pod security context |
| createConfig | bool | `true` | |
| reloadEnabled | bool | `false` | Enable reload collector data handler (endpoint /reload) |

### Prometheus ServiceMonitor

Expand Down
6 changes: 5 additions & 1 deletion helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: ["-config.file=/etc/sql_exporter/sql_exporter.yml"]
args:
- "-config.file=/etc/sql_exporter/sql_exporter.yml"
{{- if .Values.reloadEnabled }}
- "-web.enable-reload"
{{- end }}
{{- if eq (include "sql-exporter.volumes" .) "\"true\"" }}
volumeMounts:
{{- if .Values.createConfig }}
Expand Down
2 changes: 2 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ serviceMonitor:
# mountPath: /etc/config
# Set to true to create a config as a part of the helm chart
createConfig: true
# -- Enable reload collector data handler (endpoint /reload)
reloadEnabled: false
config:
global:
# -- Scrape timeout
Expand Down

0 comments on commit 0833fd9

Please sign in to comment.