-
Notifications
You must be signed in to change notification settings - Fork 61
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
K8SPG-708 replace ready/live probe http check with custom command, change pg entrypoint #1099
Changes from all commits
7f5625f
9be2645
e618bd7
85aada5
27d6db0
7eaae86
b759611
4c6b426
84350e5
41132e6
cdd7e32
8e5f5c0
e410638
dcb5531
c1f48de
38369c3
6c02b69
0a6cfff
96ce741
41afaf7
df5ca7f
9300084
523038d
dd584de
3a53a41
61d225b
dd07386
75a381d
2258101
04b4eec
867e656
9291383
041febb
3843fd2
3510a25
62ce7e2
61f19f6
dbe5f09
bcc09c7
a96b148
2ea0968
4286621
ebf5d76
8481dfc
bf76488
e068324
41fa93d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# /pgdata/ is already mounted to the pg database container with rw permissions | ||
recovery_file='/pgdata/sleep-forever' | ||
if [[ -f ${recovery_file} ]]; then | ||
set +o xtrace | ||
echo "The $recovery_file file is detected, node entered an infinite sleep" | ||
echo "If you want to exit from the infinite sleep, remove the $recovery_file file" | ||
|
||
if [[ ! -d /tmp/postgres ]]; then | ||
mkdir -p /tmp/postgres | ||
fi | ||
|
||
while [ -f "${recovery_file}" ]; do | ||
sleep 3 | ||
done | ||
exit 0 | ||
fi | ||
|
||
exec "$@" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
PATRONI_PORT=8008 | ||
PATRONI_HOST=localhost | ||
|
||
# /pgdata/ is already mounted to the pg database container with rw permissions | ||
recovery_file='/pgdata/sleep-forever' | ||
if [ -f "${recovery_file}" ]; then | ||
set +o xtrace | ||
echo "The $recovery_file file is detected, node entered an infinite sleep" | ||
echo "If you want to exit from the infinite sleep, remove the $recovery_file file" | ||
exit 0 | ||
fi | ||
|
||
response=$(curl -s -o /dev/null -w "%{http_code}" -k "https://${PATRONI_HOST}:${PATRONI_PORT}/liveness") | ||
|
||
if [[ $response -eq 200 ]]; then | ||
exit 0 | ||
fi | ||
exit 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
PATRONI_PORT=8008 | ||
PATRONI_HOST=localhost | ||
|
||
response=$(curl -s -o /dev/null -w "%{http_code}" -k "https://${PATRONI_HOST}:${PATRONI_PORT}/readiness") | ||
|
||
if [[ $response -eq 200 ]]; then | ||
exit 0 | ||
fi | ||
exit 1 |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we fix this image with main tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is just for tests. As soon as we see that all tests are ok we need to remove it at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes correct, we have it only for these tests to work and to confirm that the PR is alright. We will change it on a followup PR after we merge.