Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes various issues in check engine script. #7666

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions scripts/check-engine.sh
Original file line number Diff line number Diff line change
@@ -1,37 +1,45 @@
#!/bin/bash

apiName="${RELEASE_NAME}-xrengine-api"
clientName="${RELEASE_NAME}-xrengine-client"
instanceserverName="${RELEASE_NAME}-instanceserver"

apiCount=$(kubectl get deploy $apiName -o jsonpath='{.status.availableReplicas}')
if [ -z "$apiCount" ]; then
apiCount=0
fi
echo "API ready count: $apiCount"

# Wait until api count is 1.
until [ $apiCount -ge 1 ]
do
until [ "${apiCount}" -ge 1 ]; do
sleep 5

apiCount=$(kubectl get deploy $apiName -o jsonpath='{.status.availableReplicas}')
echo "API ready count: $apiCount"
done

clientCount=$(kubectl get deploy $clientName -o jsonpath='{.status.availableReplicas}')
if [ -z "$clientCount" ]; then
clientCount=0
fi
echo "Client ready count: $clientCount"

# Wait until client count is 1.
until [ $clientCount -ge 1 ]
do
until [ "${clientCount}" -ge 1 ]; do
sleep 5

clientCount=$(kubectl get deploy $clientName -o jsonpath='{.status.availableReplicas}')
echo "Client ready count: $clientCount"
done

instanceserverCount=$(kubectl get fleet $instanceserverName -o jsonpath='{.status.readyReplicas}')
if [ -z "$instanceserverCount" ]; then
instanceserverCount=0
fi
echo "Instanceserver ready count: $instanceserverCount"

# Wait until instanceserver count is 1.
until [ $instanceserverCount -ge 1 ]
do
until [ "${instanceserverCount}" -ge 1 ]; do
sleep 5

instanceserverCount=$(kubectl get fleet $instanceserverName -o jsonpath='{.status.readyReplicas}')
Expand Down