Skip to content

fix(graph): handle EndpointSlice deletion without labels - #5752

Open
AruneshDwivedi wants to merge 2 commits into
nginx:mainfrom
AruneshDwivedi:fix/endpoint-slice-2
Open

fix(graph): handle EndpointSlice deletion without labels#5752
AruneshDwivedi wants to merge 2 commits into
nginx:mainfrom
AruneshDwivedi:fix/endpoint-slice-2

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

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

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>
@nginx-bot

nginx-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown

Hi @AruneshDwivedi! Welcome to the project! 🎉

Thanks for opening this pull request!
Be sure to check out our Contributing Guidelines while you wait for someone on the team to review this.

Please make sure to include the issue number in the PR description to automatically close the issue when the PR is merged.
See Linking a pull request to an issue and our Pull Request Guidelines for more information.

@nginx-bot nginx-bot Bot added the community label Aug 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 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.

@github-actions github-actions Bot added the bug Something isn't working label Aug 22, 2026
@shaun-nx

Copy link
Copy Markdown
Contributor

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

@sjberman

Copy link
Copy Markdown
Contributor

@AruneshDwivedi Per my comment on the previous PR, please update the PR description to match the provided template.

@AruneshDwivedi

Copy link
Copy Markdown
Author

Thanks @shaun-nx, this is indeed fixing #5734. The PR description references #5745 which was the previous attempt -- I have updated it to correctly close #5734.

@AruneshDwivedi

Copy link
Copy Markdown
Author

Thanks @sjberman, PR description updated to match the template. Let me know if anything else is needed.

@sjberman

Copy link
Copy Markdown
Contributor

@AruneshDwivedi I'm not seeing any changes to the PR description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working community

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

3 participants