Skip to content

Fix policy attachment when ancestors slice is full #3698

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

Merged
merged 18 commits into from
Aug 15, 2025

Conversation

sarthyparty
Copy link
Contributor

@sarthyparty sarthyparty commented Aug 6, 2025

Proposed changes

Problem: Multiple bugs when ancestor slice was full:

  • BackendTLSPolicy became invalid
  • NGF Policies would not partially attach policies to services when multiple ancestor refs were created from a single service but attach to the whole service
  • No condition was added to ancestor
  • No logs on controller

Solution: Added conditions to ancestor and logs to controller. I fixed BackendTLSPolicy to add attachments until ancestors became full and fixed NGF policies as well

Testing: Currently unit tests and manual tested

Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide
specific feedback, add them here.

Closes #1987

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.


@github-actions github-actions bot added the bug Something isn't working label Aug 6, 2025
@sarthyparty sarthyparty force-pushed the bug/handle-policy-ancestor branch from b5891a0 to 3041aa9 Compare August 7, 2025 20:15
@sarthyparty sarthyparty marked this pull request as ready for review August 11, 2025 19:41
@sarthyparty sarthyparty requested a review from a team as a code owner August 11, 2025 19:41
@sarthyparty sarthyparty force-pushed the bug/handle-policy-ancestor branch from e02c8bb to 624fd46 Compare August 11, 2025 19:41
@sarthyparty sarthyparty requested a review from sjberman August 12, 2025 23:15
@sarthyparty sarthyparty force-pushed the bug/handle-policy-ancestor branch 2 times, most recently from 5a0abd0 to ad62fba Compare August 13, 2025 18:04
@sarthyparty sarthyparty force-pushed the bug/handle-policy-ancestor branch from 34594c9 to 2b2a2b6 Compare August 14, 2025 16:42
@sarthyparty sarthyparty requested a review from salonichf5 August 14, 2025 20:10
Copy link
Contributor

@ciarams87 ciarams87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I tested it locally and everything seems to be working as expected.

Excellent work @sarthyparty 🥳!🔥 🔥 🔥

Copy link
Contributor

@salonichf5 salonichf5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@sarthyparty sarthyparty force-pushed the bug/handle-policy-ancestor branch from cee735f to 0ae3ca8 Compare August 15, 2025 17:12
@sarthyparty sarthyparty enabled auto-merge (squash) August 15, 2025 17:14
@sarthyparty sarthyparty merged commit a71ac1f into nginx:main Aug 15, 2025
42 checks passed
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NGINX Gateway Fabric Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Handle policy attachment when ancestor status slice is full
4 participants