Skip to content

Commit 41a8077

Browse files
committed
Fix reset environment ASG resize missing cluster name for filter
1 parent cce5f56 commit 41a8077

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lab/bin/reset-environment

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ if [[ "$mng_size_config" != "$expected_size_config" ]]; then
135135
sleep 10
136136
fi
137137

138-
asg_size_config=$(aws autoscaling describe-auto-scaling-groups --filters "Name=tag:eks:nodegroup-name,Values=$EKS_DEFAULT_MNG_NAME" | jq -r '.AutoScalingGroups[0] | "\(.MinSize) \(.MaxSize) \(.DesiredCapacity)"')
138+
asg_size_config=$(aws autoscaling describe-auto-scaling-groups --filters "Name=tag:eks:nodegroup-name,Values=$EKS_DEFAULT_MNG_NAME" "Name=tag:eks:cluster-name,Values=$EKS_CLUSTER_NAME" | jq -r '.AutoScalingGroups[0] | "\(.MinSize) \(.MaxSize) \(.DesiredCapacity)"')
139139

140140
if [[ "$asg_size_config" != "$expected_size_config" ]]; then
141141
echo "Setting ASG back to initial sizing..."
142142

143-
export ASG_NAME=$(aws autoscaling describe-auto-scaling-groups --filters "Name=tag:eks:nodegroup-name,Values=$EKS_DEFAULT_MNG_NAME" --query "AutoScalingGroups[0].AutoScalingGroupName" --output text)
143+
export ASG_NAME=$(aws autoscaling describe-auto-scaling-groups --filters "Name=tag:eks:nodegroup-name,Values=$EKS_DEFAULT_MNG_NAME" "Name=tag:eks:cluster-name,Values=$EKS_CLUSTER_NAME" --query "AutoScalingGroups[0].AutoScalingGroupName" --output text)
144144
aws autoscaling update-auto-scaling-group \
145145
--auto-scaling-group-name $ASG_NAME \
146146
--min-size $EKS_DEFAULT_MNG_MIN \

0 commit comments

Comments
 (0)