summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--setup/projects/adei/vars/mysql.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup/projects/adei/vars/mysql.yml b/setup/projects/adei/vars/mysql.yml
index dd9aa0e..bb0b7f2 100644
--- a/setup/projects/adei/vars/mysql.yml
+++ b/setup/projects/adei/vars/mysql.yml
@@ -102,6 +102,6 @@ mysql:
resources: { request: { cpu: 2000m, mem: 16Gi } }
probes:
- { type: "liveness", port: 3306 }
- - { type: "readiness", command: [ /bin/sh, -i, -c, MYSQL_PWD="$MYSQL_PASSWORD" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1' ], delay: "15", timeout: "5" }
+ - { type: "readiness", command: [ /bin/sh, -i, -c, test $(MYSQL_PWD="$MYSQL_PASSWORD" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SHOW SLAVE STATUS\G' | grep Seconds_Behind_Master | awk '{print $2}') -lt 120 ], delay: "15", timeout: "5" }
# hooks:
# - { type: "postStart", command: [ "/bin/bash", "/var/lib/init/mysql/initdb.sh" ] }