You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cluster_info=$(eksctl get cluster --name=$CORTEX_CLUSTER_NAME --region=$CORTEX_REGION -o json)
25
+
cluster_info_exit_code=$?
26
+
set -e
27
+
28
+
# No cluster
29
+
if [ $cluster_info_exit_code-ne 0 ];then
23
30
if [ "$arg1"="--update" ];then
24
31
echo"error: there isn't a Cortex cluster named \"$CORTEX_CLUSTER_NAME\" in $CORTEX_REGION; please update your configuration to point to an existing Cortex cluster or create a Cortex cluster with \`cortex cluster up\`"
echo"error: your Cortex cluster named \"$CORTEX_CLUSTER_NAME\" in $CORTEX_REGION is currently spinning down; please try again once it is completely deleted (may take a few minutes)"
45
+
exit 1
46
+
fi
47
+
48
+
if [ "$cluster_status"=="CREATING" ];then
49
+
echo"error: your Cortex cluster named \"$CORTEX_CLUSTER_NAME\" in $CORTEX_REGION is currently spinning up; please try again once it is ready"
50
+
exit 1
51
+
fi
52
+
53
+
if [ "$cluster_status"=="FAILED" ];then
54
+
echo"error: your Cortex cluster named \"$CORTEX_CLUSTER_NAME\" in $CORTEX_REGION is failed; delete it with \`eksctl delete cluster --name=$CORTEX_CLUSTER_NAME --region=$CORTEX_REGION\` and try again"
55
+
exit 1
56
+
fi
57
+
58
+
# Catch all
59
+
if [ "$cluster_status"!="ACTIVE" ];then
60
+
echo"error: your Cortex cluster named \"$CORTEX_CLUSTER_NAME\" in $CORTEX_REGION is not active; please wait until it is active, or delete it with \`eksctl delete cluster --name=$CORTEX_CLUSTER_NAME --region=$CORTEX_REGION\` and try again"
0 commit comments