From c2c06de6d26ec4bc90936c4c158fb7fbface002d Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Sun, 14 Jan 2024 13:17:25 -0800 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-13280 Signed-off-by: stephb9959 --- chart/templates/_initdb_scripts.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chart/templates/_initdb_scripts.tpl b/chart/templates/_initdb_scripts.tpl index cb2a456..881a6eb 100644 --- a/chart/templates/_initdb_scripts.tpl +++ b/chart/templates/_initdb_scripts.tpl @@ -5,6 +5,8 @@ #!/bin/bash export PGPASSWORD=$PGPOOL_POSTGRES_PASSWORD +echo "Testing if postgres is running, executing script" + until psql -h {{ include "postgresql-ha.postgresql" $postgresqlEmulatedRoot }} postgres postgres -c '\q'; do >&2 echo "Postgres is unavailable - sleeping" sleep 1