Skip to content

Commit

Permalink
fix(cluster): make PGDBNAME optional in ping.yaml 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 Sep 6, 2024
1 parent 292f202 commit 3571662
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion charts/cluster/templates/tests/ping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ spec:
secretKeyRef:
name: {{ include "cluster.fullname" . }}-app
key: dbname
optional: true
args:
- "-c"
- >-
apk add postgresql-client &&
psql "postgresql://$PGUSER:$PGPASS@{{ include "cluster.fullname" . }}-rw.{{ .Release.Namespace }}.svc.cluster.local:5432/$PGDBNAME" -c 'SELECT 1'
psql "postgresql://$PGUSER:$PGPASS@{{ include "cluster.fullname" . }}-rw.{{ .Release.Namespace }}.svc.cluster.local:5432/${PGDBNAME:-$PGUSER}" -c 'SELECT 1'

0 comments on commit 3571662

Please sign in to comment.