-
Notifications
You must be signed in to change notification settings - Fork 108
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
Fix VirtualRouter route deletion sequence #768
Conversation
This addresses a few rough edges with updating a VirtualRouter. After this change, it is possible to update the listener protocol on the CRD in one step. It is also possible to remove the listener at the same time as the routes which use that listener.
When running this against a test cluster, discovered that the logic must filter to only names with SDK routes before adding them to a deletion list.
|
||
return unmatchedSDKRouteRefs | ||
} | ||
|
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.
Could we get unit tests covering remove
and this function?
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.
Sure, I'll get some test coverage written up for those.
Adds unit test coverage for the new functions. A possible nil pointer dereference is fixed, which could occur if port matching is not utilized.
The API call to describe the route is not needed, as the route ref contains all the information needed to delete routes.
Merged. It might be a bit before we release this as the default, but we can try to put up a version you can use in the meantime with a helm override if that'd be useful. |
Great, thanks! I would appreciate having an official image to run these changes in test environments, if it’s not too much trouble. |
This addresses a few rough edges with updating a
VirtualRouter
, by removing routes which will be deleted before updating the listeners. After this change, it is possible to update the listener protocol on the CRD in one step. It is also possible to remove the listener at the same time as the routes which use that listener.Issue #, if available: #767
Description of changes:
Adds a step to the
VirtualRouter
reconciliation sequence which identifies the routes to remove and deletes them before the corresponding listeners are updated. This allows a greater range of valid API changes to be successfully reconciled.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.