1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/ossm-auto-route.adoc
2020-11-09 15:27:38 -05:00

68 lines
2.1 KiB
Plaintext

////
This TASK module included in the following assemblies:
// * service_mesh/v2x/ossm-traffic-manage.adoc
////
[id="ossm-auto-route_{context}"]
= Automatic route creation
OpenShift routes for Istio Gateways are automatically managed in {ProductName}. Every time an Istio Gateway is created, updated or deleted inside the service mesh, an OpenShift route is created, updated or deleted.
[id="ossm-auto-route-enable_{context}"]
== Disabling Automatic Route Creation
By default, the `ServiceMeshControlPlane` automatically synchronizes the Gateway resources with OpenShift routes.
You can disable integration between Istio Gateways and OpenShift Routes by setting the `ServiceMeshControlPlane` field `gateways.openshiftRoute.enabled` to `false`. For example, see the following resource snippet.
[source,yaml]
----
spec:
gateways:
openshiftRoute:
enabled: false
----
[id="ossm-auto-route-subdomains_{context}"]
== Subdomains
{ProductName} creates the route with the subdomain, but {product-title} must be configured to enable it. Subdomains, for example `*.domain.com`, are supported but not by default.
If the following gateway is created:
[source,yaml]
----
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: gateway1
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- www.bookinfo.com
- bookinfo.example.com
----
Then, the following OpenShift Routes are created automatically. You can check that the routes are created with the following command.
[source,terminal]
----
$ oc -n <control_plane_namespace> get routes
----
.Expected output
[source,terminal]
----
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
gateway1-lvlfn bookinfo.example.com istio-ingressgateway <all> None
gateway1-scqhv www.bookinfo.com istio-ingressgateway <all> None
----
If the gateway is deleted, {ProductName} deletes the routes. However, routes created manually are never modified by {ProductName}.