Skip to content

Commit

Permalink
add PGDBNAME to database-ping-test cloudnative-pg#368
Browse files Browse the repository at this point in the history
Signed-off-by: Uğurcan Akkök <[email protected]>
  • Loading branch information
UgurcanAkkok committed Nov 6, 2024
1 parent 238f826 commit 4403864
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion charts/cluster/templates/tests/ping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 4403864

Please sign in to comment.