Merge pull request #119 from pkubatrh/psql_check

Use postgresql's readycheck in templates
This commit is contained in:
Petr Kubat 2018-03-12 08:01:09 +01:00 committed by GitHub
commit 2cb1d55a70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -400,14 +400,14 @@
"timeoutSeconds": 1, "timeoutSeconds": 1,
"initialDelaySeconds": 5, "initialDelaySeconds": 5,
"exec": { "exec": {
"command": [ "/bin/sh", "-i", "-c", "psql -h 127.0.0.1 -U ${POSTGRESQL_USER} -q -d ${POSTGRESQL_DATABASE} -c 'SELECT 1'"] "command": [ "/usr/libexec/check-container" ]
} }
}, },
"livenessProbe": { "livenessProbe": {
"timeoutSeconds": 1, "timeoutSeconds": 10,
"initialDelaySeconds": 30, "initialDelaySeconds": 120,
"tcpSocket": { "exec": {
"port": 5432 "command": [ "/usr/libexec/check-container", "--live" ]
} }
}, },
"resources": { "resources": {

View file

@ -381,14 +381,14 @@
"timeoutSeconds": 1, "timeoutSeconds": 1,
"initialDelaySeconds": 5, "initialDelaySeconds": 5,
"exec": { "exec": {
"command": [ "/bin/sh", "-i", "-c", "psql -h 127.0.0.1 -U ${POSTGRESQL_USER} -q -d ${POSTGRESQL_DATABASE} -c 'SELECT 1'"] "command": [ "/usr/libexec/check-container" ]
} }
}, },
"livenessProbe": { "livenessProbe": {
"timeoutSeconds": 1, "timeoutSeconds": 10,
"initialDelaySeconds": 30, "initialDelaySeconds": 120,
"tcpSocket": { "exec": {
"port": 5432 "command": [ "/usr/libexec/check-container", "--live" ]
} }
}, },
"resources": { "resources": {