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

AWS EKS cleanup fix. #58

Merged
merged 3 commits into from
Nov 7, 2024
Merged

AWS EKS cleanup fix. #58

merged 3 commits into from
Nov 7, 2024

Conversation

viktor-kurchenko
Copy link
Contributor

(please see the commit messages)

This is the quick fix for the AWS cleaner to remove EKS depended
resources. The SDK ELB package works only with `classic` load balancers.
To list and remove `network` or `application` ELBs we need to use SDK
ELB V2 package:
`github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`.
Initial implementation assumption was that cluster should be removed
at the end of the cleanup proccess. This allows to restart cleanup
proccess from scratch in case of dependency cleanup issues.

But for some EKS setups we might have ENIs attached directly to a cluster.
That blocks VPC deletion while ENIs exist. The ENIs are deleted
automatically after cluster deletion.
So, I moved cluster drop to the beginning of the proccess.
auriaave
auriaave previously approved these changes Nov 7, 2024
Copy link
Contributor

@auriaave auriaave left a comment

Choose a reason for hiding this comment

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

Overall, LGTM. Minor improvement on the deleteVpcAndEks function. Thank you.

pkg/aws/cleaner.go Outdated Show resolved Hide resolved
The function `deleteVpcAndEks` refactored to avoid errors lost.
@viktor-kurchenko viktor-kurchenko merged commit ac657a5 into main Nov 7, 2024
3 checks passed
@viktor-kurchenko viktor-kurchenko deleted the vk/pr/eks/cleanup/fix branch November 7, 2024 15:09
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.

2 participants