aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/consul/resources/config/consul-agent-config/scripts/mr-zookeeper-health.sh
blob: 47c42d54efb4659d1a9243aaede80853e183cdc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
zkpod=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "message-router-zookeeper-[^[:space:]]*")
if [ -n "$zkpod" ]; then
   if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $zkpod -- ps ef | grep -i zookeeper; then
      echo Success. Zookeeper process is running. 2>&1
      exit 0
   else
      echo Failed. Zookeeper is not running. 2>&1
      exit 1
   fi
else
   echo Failed. Zookeeper container is offline. 2>&1
   exit 1
fi