Skip to content

Commit

Permalink
Merge branch 'istio:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
yasamdogan committed Oct 27, 2023
2 parents 7d5bc12 + 4ef8f07 commit d98bbe4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion common/.commonfiles.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2619bb82dacb10cb055a2c8ccf40750d1185570e
ff50f7c976555f0f45bc1ae6045ed229dc4dfdfe
2 changes: 2 additions & 0 deletions common/config/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ issues:
linters:
- errcheck
- maligned
- path: _test\.go$
text: "dot-imports: should not use dot imports"
# We need to use the deprecated module since the jsonpb replacement is not backwards compatible.
- linters:
- staticcheck
Expand Down
4 changes: 2 additions & 2 deletions content/zh/docs/setup/platform-setup/oci/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $ oci ce cluster create \

从您的本地机器集群[安装 `kubectl`][kubectl][OCICLI][OCICLI](`OCI`) 接入 OKE 集群。

使用以下 OCI CLI 命令创建或更新 `kubecconfig` 文件包括一个 `oci` 命令,
使用以下 OCI CLI 命令创建或更新 `kubeconfig` 文件包括一个 `oci` 命令,
它可以动态地生成和插入一个短期的认证令牌允许 `kubectl` 访问集群:

{{< text bash >}}
Expand All @@ -57,7 +57,7 @@ $ oci ce cluster create-kubeconfig \
{{< /text >}}

{{< tip >}}
虽然一个 OKE 集群可能暴露多个端点,但只会攻击 `kubecconfig` 文件中的那个端点。
虽然一个 OKE 集群可能暴露多个端点,但只会攻击 `kubeconfig` 文件中的那个端点。
{{< /tip >}}

`kube-endpoint` 支持的值是 `PUBLIC_ENDPOINT``PRIVATE_ENDPOINT`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ kube-proxy 并阻止其将流量发送到其他节点,使用 `externalTrafficP
有关更多信息,请参阅[服务源 IP `Type=NodePort`](https://kubernetes.io/zh-cn/docs/tutorials/services/source-ip/#source-ip-for-services-with-type-nodeport)
{{< /warning >}}

使用以下命令更新 Ingress 网关以设置 `exteralTrafficPolicy:Local` 以保留 Ingress 网关上的原始客户端源 IP:
使用以下命令更新 Ingress 网关以设置 `externalTrafficPolicy:Local` 以保留 Ingress 网关上的原始客户端源 IP:

{{< tabset category-name="config-api" >}}

Expand Down Expand Up @@ -352,9 +352,9 @@ spec:

## 基于 IP 的允许列表和拒绝列表 {#ip-based-allow-list-and-deny-list}

**何时使用 `ipBlocks``emoteIpBlocks`:** 如果您使用 X-Forwarded-For HTTP 头部
或代理协议来确定原始客户端 IP 地址,则应在 `AuthorizationPolicy` 中使用 `emoteIpBlocks`
如果您使用的是 `ExtraalTrafficPolicy:Local`,那么您的 `AuthorizationPolicy` 中应该使用
**何时使用 `ipBlocks``remoteIpBlocks`:** 如果您使用 X-Forwarded-For HTTP 头部
或代理协议来确定原始客户端 IP 地址,则应在 `AuthorizationPolicy` 中使用 `remoteIpBlocks`
如果您使用的是 `externalTrafficPolicy:Local`,那么您的 `AuthorizationPolicy` 中应该使用
`ipBlocks`

| 负载均衡器类型 | 客户端源 IP | `ipBlocks``remoteIpBlocks`
Expand All @@ -363,7 +363,7 @@ spec:
| Network | packet source address| `ipBlocks`
| HTTP/HTTPS | X-Forwarded-For | `remoteIpBlocks`

* 以下命令为创建授权策略`Inress-Policy` Istio Ingress 网关。
* 以下命令为创建授权策略`ingress-policy` Istio Ingress 网关。
以下策略将 `action` 字段设置为 `ALLOW` 以允许 `ipBlocks` 中指定的 IP 地址访问 Ingress 网关。
不在列表中的 IP 地址将被拒绝。`ipBlocks` 支持单 IP 地址和 CIDR 表示法。

Expand Down Expand Up @@ -512,7 +512,7 @@ $ CLIENT_IP=$(kubectl get pods -n foo -o name -l istio.io/gateway-name=httpbin-g

{{< /tabset >}}

* 更新 `inress-policy` 以包含您的客户端 IP 地址:
* 更新 `ingress-policy` 以包含您的客户端 IP 地址:

{{< tabset category-name="config-api" >}}

Expand Down Expand Up @@ -617,7 +617,7 @@ EOF
200
{{< /text >}}

* 更新 `Inress-Policy` 授权策略,将 `action` 键设置为 `DENY`
* 更新 `ingress-policy` 授权策略,将 `action` 键设置为 `DENY`
禁止 `ipBlocks` 中指定的 IP 地址访问 Ingress 网关:

{{< tabset category-name="config-api" >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ EOF

{{< /tabset >}}

3) 在浏览器中打开 Bookinfo 的网址 `http://$GATEWAY_URL/productpage`
3) 在浏览器中打开 Bookinfo 的网址 `http://$GATEWAY_URL/productpage`
其中 `$GATEWAY_URL` 是入口的外部 IP 地址,如
[Bookinfo](/zh/docs/examples/bookinfo/#determine-the-ingress-ip-and-port)
文档中所述。

这时可以看到 Bookinfo 应用运行正常(显示了评级的星型符号),但是每次刷新页面,
都会有 2 秒的延迟。
Expand Down

0 comments on commit d98bbe4

Please sign in to comment.