fix(graph): handle EndpointSlice deletion without labels - #5752
fix(graph): handle EndpointSlice deletion without labels#5752AruneshDwivedi wants to merge 2 commits into
Conversation
When an EndpointSlice is deleted, the delete event carries a prototype object with no labels. The existing code extracts the service name from labels to check if the slice is referenced, which returns empty and causes the deletion to be ignored. Add a fallback that checks if any referenced service exists in the same namespace as the deleted slice. This is a coarse but correct check that prevents stale upstream servers from persisting after slice deletion. Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
|
Hi @AruneshDwivedi! Welcome to the project! 🎉 Thanks for opening this pull request! Please make sure to include the issue number in the PR description to automatically close the issue when the PR is merged. |
|
🎉 Thank you for your contribution! It appears you have not yet signed the F5 Contributor License Agreement (CLA), which is required for your changes to be incorporated into an F5 Open Source Software (OSS) project. Please kindly read the F5 CLA and reply on a new comment with the following text to agree: I have hereby read the F5 CLA and agree to its terms You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
|
Hi @AruneshDwivedi, thanks for the contribution! Just to confirm, is this the issue you're fixing? #5734 the PR description is pointing to PR #5745 |
|
@AruneshDwivedi Per my comment on the previous PR, please update the PR description to match the provided template. |
|
Thanks @sjberman, PR description updated to match the template. Let me know if anything else is needed. |
|
@AruneshDwivedi I'm not seeing any changes to the PR description |
fix(graph): handle EndpointSlice deletion without labels
When an EndpointSlice is deleted, the delete event carries a prototype
object with no labels. The existing code extracts the service name from
labels to check if the slice is referenced, which returns empty and
causes the deletion to be ignored.
This leads to stale upstream servers in NGINX configuration, producing
502s or connection timeouts for traffic hashed to those endpoints.
The fix adds a fallback that checks if any referenced service exists
in the same namespace as the deleted slice. This is a coarse but
correct check that prevents stale upstream servers from persisting.
Fixes #5745