forked from openshift/cluster-ingress-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set spec.subdomain on the canary route
Set spec.subdomain on the canary route so that the route is exposed using the respective domain of any shard that exposes the route. Before this commit, the canary route specified neither spec.subdomain nor spec.host, and so the API server would set a default value for spec.host using the cluster ingress domain. If the cluster ingress domain didn't match the default IngressController's domain, then this would cause canary checks to fail. For example, the cluster-admin could end up in this situation by first using the cluster ingress config's appsDomain option to set a custom domain different from the domain of the default IngressController and then deleting the canary route so that it would be recreated with the custom domain. This commit ensures that the canary route continues to work in this example. This commit fixes OCPBUGS-16089. https://issues.redhat.com/browse/OCPBUGS-16089 * pkg/operator/controller/canary/controller.go (startCanaryRoutePolling): * pkg/operator/controller/canary/http.go (probeRouteEndpoint): Use the new getRouteHost helper function. * pkg/operator/controller/canary/route.go (canaryRouteChanged): Check whether spec.host or spec.subdomain have changed, and update them if they have. (desiredCanaryService): Specify spec.subdomain. (getRouteHost): New function. Return the host name of the route for the default IngressController. * pkg/operator/controller/canary/route_test.go (Test_desiredCanaryRoute): Verify that the route has the expected value for spec.subdomain. (Test_canaryRouteChanged): Verify that canaryRouteChanged checks and updates the spec.host and spec.subdomain fields. (Test_getRouteHost): New test. Verify that getRouteHost behaves correctly. * test/e2e/canary_test.go (TestCanaryRoute): * test/e2e/client_tls_test.go (TestClientTLS, TestMTLSWithCRLs): * test/e2e/operator_test.go (TestHTTPHeaderCapture, TestHTTPCookieCapture): * test/e2e/router_compression_test.go (TestRouterCompressionOperation) (testCompressionPolicy, getHttpHeaders): Use the new getRouteHost test helper function. * test/e2e/util_test.go (getRouteHost): New test helper function. Return the host name of the route for the named IngressController.
- Loading branch information
Showing
9 changed files
with
173 additions
and
28 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
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
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
Oops, something went wrong.