Describe the bug
If I replace the listener protocol and a matching route's protocol in a VirtualRouter at the same time, the change is accepted by the API server but fails to reconcile.
Steps to reproduce
Create a VirtualRouter with a listener and a matching route. Wait for the status to show that the VirtualRouter is successfully reconciled.
Warning events can be observed on the VirtualRouter, and the status never transitions to observe the latest generation.
Warning ReconcileError 5s VirtualRouter BadRequestException: 1 Virtual Router listener(s) cannot be removed because they are matched by existing Routes. Listing up to 5 PortMappings: [(Port: 8080, Protocol: HTTP)]
Workaround
Manually sequence the updates, by first removing the route before changing the listener protocol. Once this has reconciled, apply the desired final spec.
Describe the bug If I replace the listener protocol and a matching route's protocol in a
VirtualRouter
at the same time, the change is accepted by the API server but fails to reconcile.Steps to reproduce
VirtualRouter
with a listener and a matching route. Wait for the status to show that theVirtualRouter
is successfully reconciled.VirtualRouter
, and the status never transitions to observe the latest generation.Workaround Manually sequence the updates, by first removing the route before changing the listener protocol. Once this has reconciled, apply the desired final spec.
Expected outcome The controller should perform the API calls in the same sequence as the workaround, leaving the AWS resources in the desired state.
Environment
Additional Context: The same error can also be reproduced by removing both the listener and the route at the same time.