Skip to content
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
3 changes: 1 addition & 2 deletions manager/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,14 @@ function ensure_eks() {
asg_spot_info=$(aws autoscaling describe-auto-scaling-groups --region $CORTEX_REGION --query "AutoScalingGroups[?contains(Tags[?Key==\`alpha.eksctl.io/cluster-name\`].Value, \`$CORTEX_CLUSTER_NAME\`)]|[?contains(Tags[?Key==\`alpha.eksctl.io/nodegroup-name\`].Value, \`ng-cortex-worker-spot\`)]")
asg_spot_name=$(echo "$asg_spot_info" | jq -r 'first | .AutoScalingGroupName')

if [[ -n $asg_on_demand_name ]]; then
if [[ -z $asg_spot_name ]]; then
asg_min_size=$(echo "$asg_on_demand_info" | jq -r 'first | .MinSize')
asg_max_size=$(echo "$asg_on_demand_info" | jq -r 'first | .MaxSize')
else
asg_min_size=$(echo "$asg_spot_info" | jq -r 'first | .MinSize')
asg_max_size=$(echo "$asg_spot_info" | jq -r 'first | .MaxSize')
fi


if [ "$asg_min_size" != "$CORTEX_MIN_INSTANCES" ]; then
echo -n "○ updating min instances to $CORTEX_MIN_INSTANCES "

Expand Down