forked from metallb/metallb
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the controller preserve state on reboot
This commit changes the behavior of the service reconciler to fix a bug that the controller de-assign an ip for a service after reboot. Make the service reconciler initially ignore the services, up until the first reprocessAll event finishes, where we sort and handle all of the services with assigned IP first. By doing so, we make the controller aware of the LB services with existing external IPs and sync the internal state. Only after we reprocessed all services once, and know what services are allocated and what ips are in use, return to work as normal. Add unit tests for the service controller Add unit test cases to cover the FirstCongifurtaion flag. Testcase 1: Testing the service reconcile with the flag set to true. Testcase 2: Testing the reprocessAll with the flag set to true: validate that the value is modifeid to false by the controller. Signed-off-by: liornoy <lnoy@redhat.com>
- Loading branch information
Showing
3 changed files
with
64 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters