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

instance finalizer breaks when ResourceGroup is recreated #192

Open
a-hilaly opened this issue Jan 9, 2025 · 1 comment
Open

instance finalizer breaks when ResourceGroup is recreated #192

a-hilaly opened this issue Jan 9, 2025 · 1 comment
Labels
kind/bug Something isn't working

Comments

@a-hilaly
Copy link
Member

a-hilaly commented Jan 9, 2025

Description

Currently finalizers on ResourceGroup Instances use the parent ResourceGroup's UUID to build the finalizer string (only me to blame for this call). This causes issues when a ResourceGroup is deleted and recreated, as the new ResourceGroup gets a new UUID. The controller can't properly clean up instances from the previous ResourceGroup because it doesn't recognize the old finalizer string.

Example buggy behavior:

  1. Create RG (UUID: abc-123) -> Instance gets finalizer "abc-123.kro.run/finalizer"
  2. Delete and recreate same RG (UUID: xyz-789)
  3. Original instance still has old finalizer, controller doesn't recognize it
  4. Manual cleanup required

Fix: Use a deterministic string for finalizers based on the ResourceGroup name or kind instead of its UUID.

Which option describes the most your issue?

No response

@a-hilaly a-hilaly added the kind/bug Something isn't working label Jan 9, 2025
@rkurduka
Copy link

@a-hilaly - hi , i was looking into this , i see that "getInstanceFinalizerName()" helper function accept UID of "types.uid" , instead of it can we try using "types.Namespace" and create string as rgName + Namespace.kro.run//finalizer . Let me know do you think if this will work ? i haven't tested this yet , but let me know your thoughts on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants