-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add delete predicate for gateway class #1696
Conversation
Hi @hckuo! Welcome to the project! 🎉 Thanks for opening this pull request! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hckuo thanks for working on this, it looks good!
I manually verified that the delete events for GatewayClasses with a different controller name are filtered out by the predicate.
Can you update the PR description and fill out the template? Thanks!
…teway-fabric into hck/0314/delete-predicate
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1696 +/- ##
==========================================
+ Coverage 86.16% 86.18% +0.01%
==========================================
Files 87 87
Lines 5515 5522 +7
Branches 52 52
==========================================
+ Hits 4752 4759 +7
Misses 717 717
Partials 46 46 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Problem: The controller reconciles delete events for GatewayClasses that are not owned by NGF. Solution: Add a delete function to the GatewayClass predicate that ignores delete events for GatewayClasses with the wrong controller name.
Proposed changes
This PR adds a delete predicate to the gateway class checking if the controller name matches the predicate name.
Problem:
Solve the issue of #1476 where reconciler should not delete the gateway resource if the name does not match.
Solution:
Add a delete predicate to the gateway class checking if the controller name matches the predicate name.
Testing:
This PR is unit-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 #1476
Checklist
Before creating a PR, run through this checklist and mark each as complete.
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.