blob: 5f91c5e89c98d2dffaa444b1ccd206f17d308e63 [file] [log] [blame]
jasmineWen85d9d732018-03-06 16:13:35 +00001APPC_DBHOST_POD=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "appc-dbhost-[^[:space:]]*")
2if [ -n "$APPC_DBHOST_POD" ]; then
3 if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $APPC_DBHOST_POD -- ./healthcheck.sh |grep -i "mysqld is alive"; then
4 echo Success. APPC DBHost is running. 2>&1
5 exit 0
6 else
7 echo Failed. APPC DBHost is not running. 2>&1
8 exit 1
9 fi
10else
11 echo Failed. APPC DBHost is offline. 2>&1
12 exit 1
13fi