From 3ff475b92dac270dfa6b699a310ec742fd89a956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=9Furcan=20Akk=C3=B6k?= Date: Fri, 30 Aug 2024 09:42:00 +0300 Subject: [PATCH] add PGDBNAME to database-ping-test #368 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Uğurcan Akkök --- charts/cluster/templates/tests/ping.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/cluster/templates/tests/ping.yaml b/charts/cluster/templates/tests/ping.yaml index 95a474630..7a58d1732 100644 --- a/charts/cluster/templates/tests/ping.yaml +++ b/charts/cluster/templates/tests/ping.yaml @@ -30,8 +30,13 @@ spec: secretKeyRef: name: {{ include "cluster.fullname" . }}-app key: password + - name: PGDBNAME + valueFrom: + secretKeyRef: + name: {{ include "cluster.fullname" . }}-app + key: dbname args: - "-c" - >- apk add postgresql-client && - psql "postgresql://$PGUSER:$PGPASS@{{ include "cluster.fullname" . }}-rw.{{ .Release.Namespace }}.svc.cluster.local:5432" -c 'SELECT 1' + psql "postgresql://$PGUSER:$PGPASS@{{ include "cluster.fullname" . }}-rw.{{ .Release.Namespace }}.svc.cluster.local:5432/$PGDBNAME" -c 'SELECT 1'