Skip to content

Commit 921434b

Browse files
Checks MNG status before proceeding (#541)
* Support for worker node AMI version fallback * error check for node group creation
1 parent 38bb057 commit 921434b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/tekton-resources/tasks/setup/eks/awscli-mng.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ spec:
9393
echo "$node_group_name is "CREATING" at $(date)"
9494
sleep 2
9595
done
96+
97+
node_group_status="$(aws eks $ENDPOINT_FLAG --region $(params.region) describe-nodegroup --cluster-name $(params.cluster-name) --nodegroup-name $node_group_name --query nodegroup.status --output text)"
98+
if [[ $node_group_status != "ACTIVE" ]]; then
99+
echo "$node_group_name creation failed. The status is $node_group_status"
100+
exit 1
101+
fi
102+
96103
while true; do
97104
ready_node=$(kubectl get nodes -l eks.amazonaws.com/nodegroup=$node_group_name --no-headers 2>/dev/null | grep -w Ready | wc -l)
98105
echo "ready-nodes=$ready_node out of $2, for nodegroup: $node_group_name"

0 commit comments

Comments
 (0)