Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unique_host: HandleRoute: No error if host claimed
Change the unique_host plugin's HandleRoute method not to return an error because the host name is claimed. Returning an error causes the controller to log an unhelpful error message: router_controller.go:244] another route has claimed this host The plugin already logs the conflict, along with the host name and the claimants' names and namespaces, at a higher log level and updates the Route's status to indicate that it has been rejected because of a preëmpting claim. Moreover, a conflicting claim does not logically represent an error condition for the plugin or controller, and in the absence of such, it makes more sense return a nil error value after logging the condition. This commit fixes bug 1780794. https://bugzilla.redhat.com/show_bug.cgi?id=1780794 * pkg/router/controller/unique_host.go: Do not return a gratuitous error value for a preëmpting claim. * pkg/router/template/plugin_test.go (TestHandleRoute): Expect a nil error value from the unique_host plugin when handling a valid Route for which a preëmpting claim exists.
- Loading branch information