From b5dd29867c8cc6a53762d63786869697cb1a308e Mon Sep 17 00:00:00 2001 From: Igor Zibarev Date: Sat, 6 Oct 2018 23:02:51 +0300 Subject: [PATCH] [stable/postgresql] Fix metrics volume arguments (#7987) "-extend.query-path" is invalid argument to postgres_exporter since 0.4.x version due to cli library update (ref: https://github.com/wrouesnel/postgres_exporter/issues/147) Currently, as a result of invalid argument, metrics container fails to start. This commit fixes the issue by replacing broken command line argument with the corresponding environment variable, as they are more consistent. Signed-off-by: Igor Zibarev --- stable/postgresql/Chart.yaml | 2 +- stable/postgresql/templates/deployment.yaml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/stable/postgresql/Chart.yaml b/stable/postgresql/Chart.yaml index 1d5da56fbe..92e9b94a25 100644 --- a/stable/postgresql/Chart.yaml +++ b/stable/postgresql/Chart.yaml @@ -1,5 +1,5 @@ name: postgresql -version: 0.18.1 +version: 0.18.2 appVersion: 9.6.2 description: Object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance. keywords: diff --git a/stable/postgresql/templates/deployment.yaml b/stable/postgresql/templates/deployment.yaml index 86e78177cb..97e39a6aec 100644 --- a/stable/postgresql/templates/deployment.yaml +++ b/stable/postgresql/templates/deployment.yaml @@ -128,11 +128,14 @@ spec: env: - name: DATA_SOURCE_NAME value: postgresql://{{ default "postgres" .Values.postgresUser }}@127.0.0.1:5432?sslmode=disable + {{- if .Values.metrics.customMetrics }} + - name: PG_EXPORTER_EXTEND_QUERY_PATH + value: /conf/custom-metrics.yaml + {{- end }} ports: - name: metrics containerPort: 9187 {{- if .Values.metrics.customMetrics }} - args: ["-extend.query-path", "/conf/custom-metrics.yaml"] volumeMounts: - name: custom-metrics mountPath: /conf