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

Controller not cleaning up old resources #3783

Open
andrewhharmon opened this issue Jul 25, 2024 · 3 comments
Open

Controller not cleaning up old resources #3783

andrewhharmon opened this issue Jul 25, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@andrewhharmon
Copy link

Describe the bug
I initially created 3 ingresses with 3 ALBs as I was unaware I could use the group.name annotation to share 1 ALB. I am now combing all ingresses to use the same group to save money. I now have 1 ALB that works as expected for all 3 ingresses. However, my old ALBs, TargetGroups, SecurityGroups and TargetGroupBinding(k8s) are still there. They technically aren't being used bc DNS doesn't point to them, but I would expect those to get cleaned up. Not sure if I did something wrong or am missing a setting. I do not see any logs in the controller pod indicating it's even trying to cleanup these resources. I thought maybe it could be a permissions issue, but I think I'd see some type of error in the logs. Additionally, I don't see any k8s events indication issues like failure to delete the TargetGroupBinding, I don't think it's even trying to delete it. Thanks for the help.

Steps to reproduce

  • create 2 ingresses and let controller create all needed resources
  • edit each ingress to with the group.name annotation to be in the same group
  • the old deprecated ALBs are still there.

Expected outcome
Only the group ALB exist and deprecated ALBs, TargetGroups, SecurityGroups and TargetGroupBindings are cleaned up.

Environment

  • AWS Load Balancer controller version
    2.8
  • Kubernetes version
    1.29
  • Using EKS (yes/no), if so version?
    yes, eks.7

Additional Context:
Deploying controller via helm. v1.8.1

@andrewhharmon
Copy link
Author

as a follow up question, I am manually deleting these resources that are left behind. (ALB, TargetGroups, SecurityGroup, TargetGroupBindings). Are there any other resources I'm unaware of that I should also go cleanup? DNS seems fine, ingresses are removed.

@wweiwei-li
Copy link
Collaborator

Those are all the resources that needs to be deleted. We will try to reproduce it and to see if controller can take care of deleting them instead of doing it manually.

@wweiwei-li wweiwei-li added kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jul 31, 2024
@yocean-tseng
Copy link

Can we add labels on the child resources so that we can add clean up logic here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants