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
  • Loading branch information
UgurcanAkkok committed Aug 30, 2024
1 parent 9024f04 commit 666c36a
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 666c36a

Please sign in to comment.