Skip to content

Add retry logic to finalizer removal on Routes#8

Merged
tuascloan merged 4 commits intovitistack:mainfrom
haahaakon:bugfix/retry-finalizer-removal
Mar 20, 2026
Merged

Add retry logic to finalizer removal on Routes#8
tuascloan merged 4 commits intovitistack:mainfrom
haahaakon:bugfix/retry-finalizer-removal

Conversation

@haahaakon
Copy link
Copy Markdown
Contributor

@haahaakon haahaakon commented Mar 19, 2026

Multiple operators have finalizers on the HTTPRoutes and GRPCRoutes.
With multiple updates to the same field we get a race condition where we might not be the first to update the current iteration of the object. This causes the securitypolicy-operator finalizer to remain on the routes which causes routes to be stuck in deleting state.

This PR adds a retry mechanism to finalizer removal on deletion.

For future developmen we should look at using deep-copy with Patch for finalizer like what Envoy does:
https://github.com/envoyproxy/gateway/blob/ffceb4f4cfdf3205fcea4b0018c2d981264335b3/internal/provider/kubernetes/controller.go#L1950

@tuascloan tuascloan merged commit 4af3902 into vitistack:main Mar 20, 2026
2 checks passed
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