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

Use StrategicMergeFrom to update finalizers #166

Merged
merged 2 commits into from
Sep 29, 2024

Conversation

orishavit
Copy link
Contributor

Description

A possible race condition exists when deleting an object using foregroundDeletion. It is possible when deleting an object with children using foregroundDeletion, for the watcher to have a different knowledge of the finalizer list than the API server that receives the Patch request, i.e. the watcher sees the foregroundDeletion finalizer, but the server that accepts the patch request doesn't so it looks like it was added. Using StrategicMergeFrom creates a proper patch instead of replacing the list, which solves the issue.

Additionally, ignore errors for invalid patches while cleaning up.

References

Very similar bug: kubernetes/kubernetes#111643

@amitlicht amitlicht merged commit ef821aa into main Sep 29, 2024
12 checks passed
@amitlicht amitlicht deleted the shavit/iam-pods-controller-strategic-merge branch September 29, 2024 06:34
@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants