Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds sleep after creation and teardown #440

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ashishranjan738
Copy link
Contributor

This commit adds sleep after eks cluster creation because its observed that sometimes dns propagation for the created cluster takes lil bit of time, and after teardown of the eks components to ensure that all the vpc resources are released and ready to be deleted before we start deleting the VPC stack.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This commit adds sleep after eks cluster creation because its observed
that sometimes dns propagation for the created cluster takes lil bit of
time, and after teardown of the eks components to ensure that all the
vpc resources are released and ready to be deleted before we start
deleting the VPC stack.

Signed-off-by: Ashish Ranjan <rnshis@amazon.com>
@@ -57,7 +57,8 @@ spec:
if [ "$CREATED_CLUSTER" == "" ]; then
aws eks create-cluster --name $(params.cluster-name) --region $(params.region) --kubernetes-version $(params.kubernetes-version) --role-arn $SERVICE_ROLE_ARN --resources-vpc-config subnetIds=$subnets,securityGroupIds=$sg $ENDPOINT_FLAG
fi
aws eks $ENDPOINT_FLAG --region $(params.region) wait cluster-active --name $(params.cluster-name)
aws eks $ENDPOINT_FLAG --region $(params.region) wait cluster-active --name $(params.cluster-name)
sleep 300
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 60 wait cluster-active wouldn't ensure cluster is active already ?

@@ -38,6 +38,7 @@ spec:
aws eks wait nodegroup-deleted --nodegroup-name $i --cluster-name $(params.cluster-name) $ENDPOINT_FLAG --region $(params.region);
done;
aws eks delete-cluster --name $(params.cluster-name) --region $(params.region) $ENDPOINT_FLAG
sleep 900
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot of time like 15mins ? Do we really need this ? can we see if we have an option of wait until etc through aws eks cli to ensure it's deleted instead of waiting arbitrarily ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants