Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use variable for pod readiness and liveness probe script #154

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions controllers/spec/template/yaml/BaseConfigMapTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ data:
backUpFilePath="$BACKUP_DESTINATION_FOLDER/$backUpFileName"

echo "$dt - Starting DB backup of Kubegres resource $KUBEGRES_RESOURCE_NAME into file: $backUpFilePath";
echo "$dt - Running: pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U postgres -c | gzip > $backUpFilePath"
echo "$dt - Running: pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U $POSTGRES_USER -c | gzip > $backUpFilePath"

pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U postgres -c | gzip > $backUpFilePath
pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U $POSTGRES_USER -c | gzip > $backUpFilePath

if [ $? -ne 0 ]; then
rm $backUpFilePath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
command:
- sh
- -c
- exec pg_isready -U postgres -h $POD_IP
- exec pg_isready -U $POSTGRES_USER -h $POD_IP
failureThreshold: 10
initialDelaySeconds: 60
periodSeconds: 20
Expand All @@ -80,7 +80,7 @@ spec:
command:
- sh
- -c
- exec pg_isready -U postgres -h $POD_IP
- exec pg_isready -U $POSTGRES_USER -h $POD_IP
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ spec:
command:
- sh
- -c
- exec pg_isready -U postgres -h $POD_IP
- exec pg_isready -U $POSTGRES_USER -h $POD_IP
failureThreshold: 10
initialDelaySeconds: 60
periodSeconds: 20
Expand All @@ -102,7 +102,7 @@ spec:
command:
- sh
- -c
- exec pg_isready -U postgres -h $POD_IP
- exec pg_isready -U $POSTGRES_USER -h $POD_IP
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 10
Expand Down
10 changes: 5 additions & 5 deletions controllers/spec/template/yaml/Templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ data:
echo "$dt - Starting DB backup of Kubegres resource $KUBEGRES_RESOURCE_NAME into file: $backUpFilePath";
echo "$dt - Running: pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U postgres -c | gzip > $backUpFilePath"

pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U postgres -c | gzip > $backUpFilePath
pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U $POSTGRES_USER -c | gzip > $backUpFilePath

if [ $? -ne 0 ]; then
rm $backUpFilePath
Expand Down Expand Up @@ -405,7 +405,7 @@ spec:
command:
- sh
- -c
- exec pg_isready -U postgres -h $POD_IP
- exec pg_isready -U $POSTGRES_USER -h $POD_IP
failureThreshold: 10
initialDelaySeconds: 60
periodSeconds: 20
Expand All @@ -417,7 +417,7 @@ spec:
command:
- sh
- -c
- exec pg_isready -U postgres -h $POD_IP
- exec pg_isready -U $POSTGRES_USER -h $POD_IP
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 10
Expand Down Expand Up @@ -553,7 +553,7 @@ spec:
command:
- sh
- -c
- exec pg_isready -U postgres -h $POD_IP
- exec pg_isready -U $POSTGRES_USER -h $POD_IP
failureThreshold: 10
initialDelaySeconds: 60
periodSeconds: 20
Expand All @@ -565,7 +565,7 @@ spec:
command:
- sh
- -c
- exec pg_isready -U postgres -h $POD_IP
- exec pg_isready -U $POSTGRES_USER -h $POD_IP
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 10
Expand Down