Skip to content

Commit

Permalink
fix to wait for desired taco-mp replicas
Browse files Browse the repository at this point in the history
  • Loading branch information
zugwan authored Oct 8, 2021
1 parent 5aa7d1d commit 70c2650
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cluster-api-aws/artifacts/wait_and_k8s_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ do
sleep 30
done

while [ $(kubectl get machinepool -n $3 $1-$2-mp-0 -o=jsonpath='{.status.nodeRefs}' | wc -c) == 0 ]
TACO_MP_REPLICAS=$(kubectl get mp -n $3 $1-$2-mp-0 -o=jsonpath='{.spec.replicas}')

while [ $(kubectl get machinepool -n $3 $1-$2-mp-0 -o=jsonpath='{.status.nodeRefs}' | wc -c) != $TACO_MP_REPLICAS ]
do
echo "> Wait for instance is ready (20s)"
sleep 20
Expand Down

0 comments on commit 70c2650

Please sign in to comment.