diff --git a/charts/cluster/templates/tests/ping.yaml b/charts/cluster/templates/tests/ping.yaml index 95a4746305..7a58d1732b 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'