mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
fix validate-cluster.sh
This commit is contained in:
parent
46fe7f062b
commit
986164e78d
@ -153,7 +153,7 @@ while true; do
|
|||||||
componentstatuses=$(echo "${cs_status}" | grep -c 'Healthy:') || true
|
componentstatuses=$(echo "${cs_status}" | grep -c 'Healthy:') || true
|
||||||
healthy=$(echo "${cs_status}" | grep -c 'Healthy:True') || true
|
healthy=$(echo "${cs_status}" | grep -c 'Healthy:True') || true
|
||||||
|
|
||||||
if ((componentstatuses > healthy)); then
|
if ((componentstatuses > healthy)) || ((componentstatuses == 0)); then
|
||||||
if ((attempt < 5)); then
|
if ((attempt < 5)); then
|
||||||
echo -e "${color_yellow}Cluster not working yet.${color_norm}"
|
echo -e "${color_yellow}Cluster not working yet.${color_norm}"
|
||||||
attempt=$((attempt+1))
|
attempt=$((attempt+1))
|
||||||
@ -170,7 +170,7 @@ while true; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo "Validate output:"
|
echo "Validate output:"
|
||||||
kubectl_retry get cs
|
kubectl_retry get cs || true
|
||||||
if [ "${return_value}" == "0" ]; then
|
if [ "${return_value}" == "0" ]; then
|
||||||
echo -e "${color_green}Cluster validation succeeded${color_norm}"
|
echo -e "${color_green}Cluster validation succeeded${color_norm}"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user