Skip to content

Commit

Permalink
change livenessProbe command
Browse files Browse the repository at this point in the history
  • Loading branch information
zlianzhuang committed Apr 17, 2024
1 parent 126b2dd commit 6f2d86a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,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."
Expand Down

0 comments on commit 6f2d86a

Please sign in to comment.