Skip to content

Commit

Permalink
change livenessProbe command
Browse files Browse the repository at this point in the history
  • Loading branch information
zlianzhuang committed Jun 12, 2024
1 parent 14193b4 commit 3af23db
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 @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 3af23db

Please sign in to comment.