This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.4.6. 自动路由创建
Istio 网关的 OpenShift 路由在 Red Hat OpenShift Service Mesh 中被自动管理。每次在 service mesh 中创建、更新或删除 Istio 网关时,都会自动创建、更新或删除 OpenShift 路由。
4.6.1. 启用自动路由创建 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
名为 Istio OpenShift Routing (IOR) 的 Red Hat OpenShift Service Mesh control plane 组件可以用来同步网关路由。作为 control plane 部署的一部分启用 IOR。
如果网关包含一个 TLS 部分,则 OpenShift Route 将被配置为支持 TLS。
-
在
ServiceMeshControlPlane
资源中添加ior_enabled
参数,并将其设置为true
。例如,请查看以下资源片断:
如需更多信息,请参阅 Istio 网关配置。
如果创建了以下网关:
然后,会自动创建以下 OpenShift 路由。您可以使用以下命令来检查是否创建了路由:
oc -n <your-control-plane-namespace> get routes
$ oc -n <your-control-plane-namespace> get routes
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
如果删除了网关,Red Hat OpenShift Service Mesh 会删除路由。但是,手动创建的路由都不会被 Red Hat OpenShift Service Mesh 修改。