Skip to content

Commit

Permalink
[prometheus-postgres-exporter] Support custom DB connection parameters (
Browse files Browse the repository at this point in the history
#1850)

Closes #1845
Signed-off-by: Ats Uiboupin <ats.uiboupin@easypark.net>
  • Loading branch information
atsu85 authored Mar 7, 2022
1 parent 560c5b6 commit ed35464
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/prometheus-postgres-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "0.10.0"
description: A Helm chart for prometheus postgres-exporter
name: prometheus-postgres-exporter
version: 2.5.0
version: 2.6.0
home: https://github.com/prometheus-community/postgres_exporter
sources:
- https://github.com/prometheus-community/postgres_exporter
Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus-postgres-exporter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Create the name of the service account to use
Set DATA_SOURCE_URI environment variable
*/}}
{{- define "prometheus-postgres-exporter.data_source_uri" -}}
{{ printf "%s:%s/%s?sslmode=%s" .Values.config.datasource.host .Values.config.datasource.port .Values.config.datasource.database .Values.config.datasource.sslmode | quote }}
{{ printf "%s:%s/%s?sslmode=%s&%s" .Values.config.datasource.host .Values.config.datasource.port .Values.config.datasource.database .Values.config.datasource.sslmode .Values.config.datasource.extraParams | quote }}
{{- end }}

{{/*
Expand Down
1 change: 1 addition & 0 deletions charts/prometheus-postgres-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ config:
port: "5432"
database: ''
sslmode: disable
extraParams: ''
datasourceSecret: {}
# Specifies if datasource should be sourced from secret value in format: postgresql://login:password@hostname:port/dbname?sslmode=disable
# Multiple Postgres databases can be configured by comma separated postgres connection strings
Expand Down

0 comments on commit ed35464

Please sign in to comment.