mirror of https://github.com/istio/istio.io.git
zh-translation/docs/reference/config/analysis/ist0109
This commit is contained in:
parent
b7b35fc28e
commit
f61ac0a666
|
@ -1,32 +1,24 @@
|
|||
---
|
||||
title: ConflictingMeshGatewayVirtualServiceHosts
|
||||
layout: analysis-message
|
||||
owner: istio/wg-user-experience-maintainers
|
||||
test: no
|
||||
---
|
||||
当 Istio 检测到因[虚拟服务](/zh/docs/reference/config/networking/virtual-service)资源重复而导致冲突时,会出现该信息。比如,多个虚拟服务使用相同的主机名且连接网格网关,会出现错误信息。需要注意的是,Istio 支持虚拟服务合并来连接入口网关。
|
||||
## 解决方案{#resolution}
|
||||
|
||||
This message occurs when Istio detects an overlap between
|
||||
[virtual service](/zh/docs/reference/config/networking/virtual-service)
|
||||
resources that conflict with one another. For example, multiple virtual
|
||||
services defined to use the same hostname and attached to a mesh gateway
|
||||
will generate an error message. Note that Istio supports merging of virtual
|
||||
services that are attached to the ingress gateways.
|
||||
解决该问题,有如下几个方法:
|
||||
|
||||
## Resolution
|
||||
* 将冲突的虚拟服务合并为一个资源
|
||||
* 连接网格网关的虚拟服务使用唯一的主机名
|
||||
* 通过设置 `exportTo` 字段,将资源范围限定到指定的命名空间。
|
||||
|
||||
To resolve this issue, you can take one of the following actions:
|
||||
## 示例{#examples}
|
||||
|
||||
* Merge the conflicting virtual services into a single resource.
|
||||
* Make the hostnames unique across virtual services attached to a mesh gateway.
|
||||
* Scope the resource to a specific namespace by setting the `exportTo` field.
|
||||
命名空间 `team1` 的虚拟服务 `productpage` 与命名空间 `team2` 的虚拟服务 `custom` 存在冲突的原因如下:
|
||||
|
||||
## Examples
|
||||
|
||||
The `productpage` virtual service in namespace `team1` conflicts with the
|
||||
`custom` virtual service in `team2` namespace because both of the following
|
||||
are true:
|
||||
|
||||
* They are attached to the default "mesh" gateway as no custom gateway is
|
||||
specified.
|
||||
* They both define the same host `productpage.default.svc.cluster.local`.
|
||||
* 因为没有指定自定义网关,它们被连接默认的“网格”网关。
|
||||
* 它们都定义了相同的主机 `productpage.default.svc.cluster.local`
|
||||
|
||||
{{< text yaml >}}
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
|
@ -57,8 +49,7 @@ spec:
|
|||
---
|
||||
{{< /text >}}
|
||||
|
||||
You can resolve this issue by setting the `exportTo` field to `.` so
|
||||
that each virtual service is scoped only to its own namespace:
|
||||
你可以通过设置 `exportTo` 字段为 `.` 来解决该问题,让每个虚拟服务都只限定在自己的命名空间:
|
||||
|
||||
{{< text yaml >}}
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
|
|
Loading…
Reference in New Issue