Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions manager/generate_eks.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def merge_override(a, b):
def apply_worker_settings(nodegroup, config):
worker_settings = {
"name": "cx-wd-" + config["name"],
"asgSuspendProcesses": ["AZRebalance"],
"labels": {"workload": "true"},
"taints": {"workload": "true:NoSchedule"},
"tags": {
Expand Down
18 changes: 0 additions & 18 deletions manager/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ function create_eks() {
eksctl create cluster --timeout=$EKSCTL_TIMEOUT --install-neuron-plugin=false --install-nvidia-plugin=false -f /workspace/eks.yaml
echo

suspend_az_rebalance

write_kubeconfig
}

Expand Down Expand Up @@ -310,22 +308,6 @@ function resize_nodegroup() {
fi
}

function suspend_az_rebalance() {
asg_on_demand_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-on-demand\`)]")
asg_on_demand_length=$(echo "$asg_on_demand_info" | jq -r 'length')
if (( "$asg_on_demand_length" > "0" )); then
asg_on_demand_name=$(echo "$asg_on_demand_info" | jq -r 'first | .AutoScalingGroupName')
aws autoscaling suspend-processes --region $CORTEX_REGION --auto-scaling-group-name $asg_on_demand_name --scaling-processes AZRebalance
fi

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_length=$(echo "$asg_spot_info" | jq -r 'length')
if (( "$asg_spot_length" > "0" )); then
asg_spot_name=$(echo "$asg_spot_info" | jq -r 'first | .AutoScalingGroupName')
aws autoscaling suspend-processes --region $CORTEX_REGION --auto-scaling-group-name $asg_spot_name --scaling-processes AZRebalance
fi
}

function setup_istio() {
envsubst < manifests/istio-namespace.yaml | kubectl apply -f - >/dev/null

Expand Down