Skip to content

Commit

Permalink
using readyReplicas as status
Browse files Browse the repository at this point in the history
  • Loading branch information
engapa committed Apr 20, 2021
1 parent 619d06e commit fe0d4b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion k8s/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function check()
echo "ERROR: Max number of attempts was reached (${MAX_ATTEMPTS})"
exit 1
fi
READY_REPLICAS=$(kubectl get -f $1 -o jsonpath='{.items[?(@.kind=="StatefulSet")].status.currentReplicas}' 2>&1)
READY_REPLICAS=$(kubectl get -f $1 -o jsonpath='{.items[?(@.kind=="StatefulSet")].status.readyReplicas}' 2>&1)
echo "[${ATTEMPTS}/${MAX_ATTEMPTS}] - Ready zookeeper replicas : ${READY_REPLICAS:-0}/$2 ... "
done
kubectl get all
Expand Down
2 changes: 1 addition & 1 deletion openshift/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function check()
echo "ERROR: Max number of attempts was reached (${MAX_ATTEMPTS})"
exit 1
fi
READY_REPLICAS=$(oc get statefulset -l component=zk -o jsonpath='{.items[?(@.kind=="StatefulSet")].status.currentReplicas}' 2>&1)
READY_REPLICAS=$(oc get statefulset -l component=zk -o jsonpath='{.items[?(@.kind=="StatefulSet")].status.readyReplicas}' 2>&1)
echo "[${ATTEMPTS}/${MAX_ATTEMPTS}] - Ready zookeeper replicas : ${READY_REPLICAS:-0}/$1 ... "
done
oc get all
Expand Down

0 comments on commit fe0d4b3

Please sign in to comment.