diff --git a/platforms/kubernetes/postgres-operator/postgres/pgsqlclusters/create.py b/platforms/kubernetes/postgres-operator/postgres/pgsqlclusters/create.py index 8a9e9c6..e7b3137 100644 --- a/platforms/kubernetes/postgres-operator/postgres/pgsqlclusters/create.py +++ b/platforms/kubernetes/postgres-operator/postgres/pgsqlclusters/create.py @@ -225,11 +225,11 @@ def create_statefulset( CONTAINER_NAME] == PODSPEC_CONTAINERS_POSTGRESQL_CONTAINER: container["args"] = ["auto_failover"] container["env"] = env - container["readinessProbe"] = { + container["livenessProbe"] = { "initialDelaySeconds": 20, "periodSeconds": 5, "exec": { - "command": WAITING_POSTGRESQL_READY_COMMAND + "command": POD_READY_COMMAND } } if container[CONTAINER_NAME] == PODSPEC_CONTAINERS_EXPORTER_CONTAINER: diff --git a/platforms/kubernetes/postgres-operator/postgres/pgsqlcommons/constants.py b/platforms/kubernetes/postgres-operator/postgres/pgsqlcommons/constants.py index da283a9..0319c42 100644 --- a/platforms/kubernetes/postgres-operator/postgres/pgsqlcommons/constants.py +++ b/platforms/kubernetes/postgres-operator/postgres/pgsqlcommons/constants.py @@ -341,6 +341,7 @@ PRIMARY_FORMATION = " --formation primary " FIELD_DELIMITER = "-" WAITING_POSTGRESQL_READY_COMMAND = ["pgtools", "-a"] +POD_READY_COMMAND = ["echo"] INIT_FINISH_MESSAGE = "init postgresql finish" STOP_FAILED_MESSAGE = "stop auto_failover failed" POSTGRESQL_NOT_RUNNING_MESSAGE = "can't connect database."