Skip to content

Commit e302ab8

Browse files
committed
Use postgresql's readycheck in templates
1 parent c5fcbb2 commit e302ab8

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

openshift/templates/django-postgresql-persistent.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,14 @@
400400
"timeoutSeconds": 1,
401401
"initialDelaySeconds": 5,
402402
"exec": {
403-
"command": [ "/bin/sh", "-i", "-c", "psql -h 127.0.0.1 -U ${POSTGRESQL_USER} -q -d ${POSTGRESQL_DATABASE} -c 'SELECT 1'"]
403+
"command": [ "/usr/libexec/check-container" ]
404404
}
405405
},
406406
"livenessProbe": {
407-
"timeoutSeconds": 1,
408-
"initialDelaySeconds": 30,
409-
"tcpSocket": {
410-
"port": 5432
407+
"timeoutSeconds": 10,
408+
"initialDelaySeconds": 120,
409+
"exec": {
410+
"command": [ "/usr/libexec/check-container", "--live" ]
411411
}
412412
},
413413
"resources": {

openshift/templates/django-postgresql.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,14 +381,14 @@
381381
"timeoutSeconds": 1,
382382
"initialDelaySeconds": 5,
383383
"exec": {
384-
"command": [ "/bin/sh", "-i", "-c", "psql -h 127.0.0.1 -U ${POSTGRESQL_USER} -q -d ${POSTGRESQL_DATABASE} -c 'SELECT 1'"]
384+
"command": [ "/usr/libexec/check-container" ]
385385
}
386386
},
387387
"livenessProbe": {
388-
"timeoutSeconds": 1,
389-
"initialDelaySeconds": 30,
390-
"tcpSocket": {
391-
"port": 5432
388+
"timeoutSeconds": 10,
389+
"initialDelaySeconds": 120,
390+
"exec": {
391+
"command": [ "/usr/libexec/check-container", "--live" ]
392392
}
393393
},
394394
"resources": {

0 commit comments

Comments
 (0)