rancher / hosted-providers-e2e

Apache License 2.0
0 stars 4 forks source link

Fix EKS cleanup on a new nodegroup addition for imported clusters #155

Closed valaparthvi closed 2 months ago

valaparthvi commented 2 months ago

What does this PR do?

  1. Modify DeleteEKSClusterOnAWS to list all the nodegroups and delete them before deleting the cluster.
  2. Rename eks_region to region to conform with the Go naming convention that says 'Names in Go should in general not contain underscores'.
  3. Fix EKS cluster not cleaned up for "reimport an existing cluster".

    Details ``` • [842.949 seconds] P1Import when a cluster is imported Reimporting/Editing a cluster with invalid config Reimport a cluster to Rancher should fail /home/gh-runner/actions-runner/_work/hosted-providers-e2e/hosted-providers-e2e/hosted/eks/p1/p1_import_test.go:146 Captured StdOut/StdErr Output >> Creating EKS cluster ... Running command: eksctl [create cluster --region=*** --name=auto-eks-hp-ci-qvvaw --version=1.30 --nodegroup-name ranchernodes --nodes 1 --managed --tags aws-janitor/marked-for-deletion=true,owner=hosted-providers-qa-ci-gh-runner,testfilenumber=line146_p1_import_test] Created EKS cluster: auto-eks-hp-ci-qvvaw time="2024-08-26T16:03:02Z" level=info msg="Cluster status is active!" Skipping downstream cluster deletion: auto-eks-hp-ci-qvvaw << Captured StdOut/StdErr Output Timeline >> "level"=0 "msg"="Using kubernetes version 1.30 for cluster auto-eks-hp-ci-qvvaw" Qase ID 101 created for run ID 860 on project HP << Timeline ------------------------------ S ```

Which issue(s) this PR fixes (optional, in fixes #(, fixes #, ...) format, will close the issue(s) when PR gets merged):

Fixes #153

Checklist:

Special notes for your reviewer: