From e302ab80f4ffb4bc3e58e3a8d2d44ea441081d41 Mon Sep 17 00:00:00 2001 From: Petr Kubat Date: Wed, 28 Feb 2018 15:58:41 +0100 Subject: [PATCH] Use postgresql's readycheck in templates --- openshift/templates/django-postgresql-persistent.json | 10 +++++----- openshift/templates/django-postgresql.json | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/openshift/templates/django-postgresql-persistent.json b/openshift/templates/django-postgresql-persistent.json index 7a0ab21..288848e 100644 --- a/openshift/templates/django-postgresql-persistent.json +++ b/openshift/templates/django-postgresql-persistent.json @@ -400,14 +400,14 @@ "timeoutSeconds": 1, "initialDelaySeconds": 5, "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": { - "timeoutSeconds": 1, - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 5432 + "timeoutSeconds": 10, + "initialDelaySeconds": 120, + "exec": { + "command": [ "/usr/libexec/check-container", "--live" ] } }, "resources": { diff --git a/openshift/templates/django-postgresql.json b/openshift/templates/django-postgresql.json index be3fc74..caf3566 100644 --- a/openshift/templates/django-postgresql.json +++ b/openshift/templates/django-postgresql.json @@ -381,14 +381,14 @@ "timeoutSeconds": 1, "initialDelaySeconds": 5, "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": { - "timeoutSeconds": 1, - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 5432 + "timeoutSeconds": 10, + "initialDelaySeconds": 120, + "exec": { + "command": [ "/usr/libexec/check-container", "--live" ] } }, "resources": {