Skip to content

Commit 9f229ac

Browse files
authored
Increase timeout to eksctl commands (#768)
1 parent 127d473 commit 9f229ac

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

manager/install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
set -e
1818

1919
CORTEX_VERSION=master
20+
EKSCTL_TIMEOUT=45m
2021

2122
arg1="$1"
2223

@@ -36,13 +37,13 @@ function ensure_eks() {
3637

3738
echo -e "○ spinning up the cluster ... (this will take about 15 minutes)\n"
3839

39-
envsubst < eks_cluster.yaml | eksctl create cluster -f -
40+
envsubst < eks_cluster.yaml | eksctl create cluster --timeout=$EKSCTL_TIMEOUT -f -
4041

4142
# https://docs.aws.amazon.com/eks/latest/userguide/cni-upgrades.html
4243
kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/v1.5.5/config/v1.5/aws-k8s-cni.yaml >/dev/null
4344

4445
python generate_eks.py $CORTEX_CLUSTER_CONFIG_FILE > $CORTEX_CLUSTER_WORKSPACE/eks_nodegroup.yaml
45-
eksctl create nodegroup -f $CORTEX_CLUSTER_WORKSPACE/eks_nodegroup.yaml
46+
eksctl create nodegroup --timeout=$EKSCTL_TIMEOUT -f $CORTEX_CLUSTER_WORKSPACE/eks_nodegroup.yaml
4647

4748
if [ "$CORTEX_SPOT" == "True" ]; then
4849
asg_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\`)]")

manager/uninstall.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616

1717
set -e
1818

19+
EKSCTL_TIMEOUT=45m
20+
1921
echo -e "spinning down the cluster ...\n"
2022

21-
eksctl delete cluster --name=$CORTEX_CLUSTER_NAME --region=$CORTEX_REGION
23+
eksctl delete cluster --name=$CORTEX_CLUSTER_NAME --region=$CORTEX_REGION --timeout=$EKSCTL_TIMEOUT
2224

2325
echo "✓ please check cloudformation to ensure that all resources for the ${CORTEX_CLUSTER_NAME} cluster are successfully deleted: https://${CORTEX_REGION}.console.aws.amazon.com/cloudformation"

0 commit comments

Comments
 (0)