[zh] Update text from ist0122 to ist0130 (#14392)

This commit is contained in:
Michael 2023-12-29 17:18:29 +08:00 committed by GitHub
parent 2211d70e26
commit 25c328b317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 53 additions and 48 deletions

View File

@ -5,13 +5,13 @@ owner: istio/wg-user-experience-maintainers
test: no
---
当 Istio 的资源字段为正则,且其存储了一个非法的正则表达式时,会出现此消息。
当 Istio 的资源字段包含非法的正则表达式时,会出现此消息。
Istio 正则表达式使用 [RE2](https://github.com/google/re2/wiki/Syntax) 语法规范.
## 示例{#example}
## 示例 {#example}
当集群包含以下资源时:
当集群包含以下 VirtualService 时:
{{< text yaml >}}
apiVersion: networking.istio.io/v1alpha3
@ -32,10 +32,10 @@ spec:
host: productpage
{{< /text >}}
您就会收到这条消息:
您就会收到这条消息
{{< text plain >}}
Warning [IST0122] (VirtualService bad-match.default) Field "uri" regular expression invalid: "[A-Z" (error parsing regexp: missing closing ]: `[A-Z`)
{{< /text >}}
在这个样例中, 正则表达式 `[A-Z` 没有遵循 RE2 规范.
在这个样例中,正则表达式 `[A-Z` 没有遵循 RE2 规范。

View File

@ -7,9 +7,9 @@ test: no
当某个命名空间**同时**定义了新老版本的自动注入标签时,会出现此消息。
## 示例{#example}
## 示例 {#example}
当集群有下面的命名空间资源时:
当集群有下面的命名空间时:
{{< text yaml >}}
apiVersion: v1
@ -21,15 +21,15 @@ metadata:
istio.io/rev: canary
{{< /text >}}
您会收到这条消息:
您会收到这条消息
{{< text plain >}}
Warning [IST0123] (Namespace busted) The namespace has both new and legacy injection labels. Run 'kubectl label namespace busted istio.io/rev-' or 'kubectl label namespace busted istio-injection-'
{{< /text >}}
在这个样例中, 命名空间 `busted` 同时使用了新老版本的自动注入标签.
在这个样例中,命名空间 `busted` 同时使用了新老版本的注入标签。
## 如何修复{#how-to-resolve}
## 如何修复 {#how-to-resolve}
- 移除 `istio-injection` 标签
- 移除 `istio.io/rev` 标签

View File

@ -5,17 +5,17 @@ owner: istio/wg-user-experience-maintainers
test: no
---
当集群的某些资源与 Istio 相关(名称归属 `istio.io`注释annotation包含以下情况时
当集群的某些资源与 Istio 相关(名称归属 `istio.io`但注解annotation包含以下情况时
- 在此版本中不存在的注
- 此版本中存在,但是其值不符合规范,比如要值是数字但是设置了一个字符串
- 注给到了错误的资源对象,比如本身需要归属 Pod 却给到了 Service
- 在此版本中不存在的注
- 此版本中存在,但是其值不符合规范,比如要值是数字但是设置了一个字符串
- 注给到了错误的资源对象,比如本身需要归属 Pod 却给到了 Service
会出现此消息。
参考 [Istio 注释表](/zh/docs/reference/config/annotations/).
参考 [Istio 的资源注解表](/zh/docs/reference/config/annotations/)。
## 示例{#example}
## 示例 {#example}
当集群包含以下资源时:
@ -27,7 +27,7 @@ metadata:
labels:
app: httpbin
annotations:
# no such Istio annotation
# 没有这种 Istio 注解
networking.istio.io/exportTwo: bar
spec:
ports:
@ -44,9 +44,10 @@ spec:
Warning [IST0108] (Service httpbin.default) Unknown annotation: networking.istio.io/exportTwo
{{< /text >}}
在这个样例中Service `httpbin` 想要使用 `networking.istio.io/exportTwo` 代替 `networking.istio.io/exportTo`.
在这个样例中Service `httpbin` 想要使用 `networking.istio.io/exportTwo`
代替 `networking.istio.io/exportTo`
## 如何修复{#how-to-resolve}
## 如何修复 {#how-to-resolve}
- 删除或修改相应注释
- 删除或重命名未知的注解
- 修改不允许的值

View File

@ -7,9 +7,9 @@ test: no
`AuthorizationPolicy` 资源的选择器匹配不到任何 Pod 时,会出现此消息。
## 示例{#example}
## 示例 {#example}
当集群包含以下资源时:
当集群包含以下 AuthorizationPolicy 时:
{{< text yaml >}}
apiVersion: security.istio.io/v1beta1
@ -20,7 +20,7 @@ metadata:
spec:
selector:
matchLabels:
app: bogus-label # Bogus label. No matching workloads
app: bogus-label # 标签有误,没有匹配的工作负载
version: v1
rules:
- from:
@ -46,9 +46,10 @@ spec:
Warning [IST0127] (AuthorizationPolicy httpbin-nopods.httpbin) No matching workloads for this resource with the following labels: app=bogus-label,version=v1
{{< /text >}}
在这个样例中, `AuthorizationPolicy` 资源 `httpbin-nopods` 需要绑定到包含 `app=bogus-label` 标签的 Pod 上,但是其不存在。
在这个样例中,`AuthorizationPolicy` 资源 `httpbin-nopods` 需要绑定到包含
`app=bogus-label` 标签的 Pod 上,但是其不存在。
## 如何修复{#how-to-resolve}
## 如何修复 {#how-to-resolve}
- 修改选择器 `selector` 以选择存在的 Pod
- 修改特定 Pod 的标签以匹配此资源的选择器

View File

@ -5,11 +5,11 @@ owner: istio/wg-user-experience-maintainers
test: no
---
如果流量策略需要 `caCertificates`,但是在目标规则Destination Rule中没有相关信息会出现该问题
如果流量策略需要 `caCertificates`,但是在 DestinationRule 中没有相关信息,会出现此消息
## 示例{#example}
## 示例 {#example}
当您的集群中包含以下目标规则时Destination Rule)
当您的集群中包含以下 DestinationRule 时
{{< text yaml >}}
apiVersion: networking.istio.io/v1alpha3
@ -23,18 +23,18 @@ spec:
mode: SIMPLE
clientCertificate: /etc/certs/myclientcert.pem
privateKey: /etc/certs/client_private_key.pem
# caCertificates not set
# caCertificates 未设置
{{< /text >}}
您将会收到以下信息:
您将会收到此消息:
{{< text plain >}}
Error [IST0128] (DestinationRule db-tls.default) DestinationRule default/db-tls in namespace default has TLS mode set to SIMPLE but no caCertificates are set to validate server identity for host: mydbserver.prod.svc.cluster.local
{{< /text >}}
在这个示例中,目标规则Destination Rule`db-tls` 被明确为 TLS但是没有设置 CA 文件信息
在这个示例中,DestinationRule 的 `db-tls` 被明确为 TLS但是没有设置 CA 证书文件
## 解决方案{#how-to-resolve}
## 如何修复 {#how-to-resolve}
- 提供 CA 证书的文件名
- 修改流量策略为不需要证书的类型

View File

@ -5,11 +5,11 @@ owner: istio/wg-user-experience-maintainers
test: no
---
当流量策略需要 `caCertificates` 时,但目标规则Destination Rule中没有设置相关信息时会出现该错误
当流量策略需要 `caCertificates` 时,但 DestinationRule 中没有设置相关信息时,会出现此消息
## 示例{#example}
## 示例 {#example}
当您的集群中具有以下目标规则Destination Rule时:
当您的集群中具有以下 DestinationRule 时:
{{< text yaml >}}
apiVersion: networking.istio.io/v1alpha3
@ -27,18 +27,18 @@ spec:
clientCertificate: /etc/certs/myclientcert.pem
privateKey: /etc/certs/client_private_key.pem
sni: my-nginx.mesh-external.svc.cluster.local
# caCertificates not set
# caCertificates 未设置
{{< /text >}}
您将会收到以下信息:
您将会收到此消息:
{{< text plain >}}
Error [IST0129] (DestinationRule db-tls.default) DestinationRule default/db-tls in namespace default has TLS mode set to SIMPLE but no caCertificates are set to validate server identity for host: mydbserver.prod.svc.cluster.local at port number:443
{{< /text >}}
在这个示例中,目标规则 `db-tls` 被指定为 TLS ,但是没有提供相关 CA 证书
在这个示例中,DestinationRule 的 `db-tls` 被指定为 TLS但是没有提供相关 CA 证书文件
## 解决方案{#how-to-resolve}
## 解决方案 {#how-to-resolve}
- 提供 CA 证书的文件名
- 修改流量策略为不需要证书的类型

View File

@ -5,11 +5,10 @@ owner: istio/wg-user-experience-maintainers
test: no
---
当 Virtual Service 包含一个永远不会使用的匹配规则时,会出现此消息,因为之前的规则中指定了相同的匹配规则。
如果因为之前的规则中指定了相同的匹配规则,在 VirtualService 包含永远不会使用的匹配规则时,
会出现此消息。当多个规则不存在任何匹配时,此消息也会出现。
当多个规则不存在任何匹配时,该消息也会出现。
## 示例{#example}
## 示例 {#example}
当您的集群中包含下列 Virtual Service 时:
@ -39,18 +38,22 @@ spec:
subset: v1
{{< /text >}}
您将会收到以下警告信息:
您将会收到以下警告消息:
{{< text plain >}}
Warning [IST0130] (VirtualService sample-foo-cluster01.default) VirtualService rule #1 not used (only the last rule can have no matches).
{{< /text >}}
在这个示例中, Virtual Service 同时指定了 fault 和 mirror 。允许同时使用,但是必须在同一个路由下。这里用户使用了两个不同的 http 路由(`-`),第一个会覆盖第二个。
在这个示例中VirtualService 同时指定了 fault 和 mirror。
允许同时使用,但是必须在同一个路由下。用户在此处使用了两个不同的
http 路由条目(每个 `-` 一个条目),第一个会覆盖第二个。
## 解决方案{#how-to-resolve}
## 如何修复 {#how-to-resolve}
当您有一个没有被 `match``http`,那么只能存在一个 http 路由。在这个示例中,移除 `mirror` 之前无法匹配的路由 `"-"`,最终的结果为:发生故障且进行镜像的路由,而不是一条故障路由和一条镜像路由。
当您有一个没有被 `match``http`,那么只能存在一个 http 路由。
在这个示例中,移除 `mirror` 之前无法匹配的路由 `"-"`
最终的结果为:发生故障且进行镜像的路由,而不是一条故障路由和一条镜像路由。
设置负载的路由时,请小心处理 YAML 文件格式。
设置复杂的路由时,请小心处理 YAML 文件格式。
重新排列您的路线,将最具体的路由放在前面。请在最后配置 'catch all' 路线。