From 85a0dc5a6dfa0d0079aeaf6b1e9f18a2da9dfae0 Mon Sep 17 00:00:00 2001 From: Jeanine-tw <76861242+Jeanine-tw@users.noreply.github.com> Date: Wed, 8 Nov 2023 22:08:05 +0800 Subject: [PATCH] doc: fix format errors (#949) * doc: fix format errors * Update Install.en.md --- docs/concepts/Architecture.en.md | 6 ++-- docs/concepts/Architecture.zh.md | 6 ++-- docs/concepts/Datapath.zh.md | 4 +-- docs/usage/Install.en.md | 47 ++++++++++++++++---------------- docs/usage/Install.zh.md | 18 ++++++------ 5 files changed, 41 insertions(+), 40 deletions(-) diff --git a/docs/concepts/Architecture.en.md b/docs/concepts/Architecture.en.md index e4fdc20de..1cc832b8f 100644 --- a/docs/concepts/Architecture.en.md +++ b/docs/concepts/Architecture.en.md @@ -103,9 +103,9 @@ Modify the configuration file to add the following configuration: feature. egressIgnoreCIDR. autoDetect. - podCIDR: "" # 1 - clusterIP: true # 2 - nodeIP: true # 3 + podCIDR: "" # (1) + clusterIP: true # (2) + nodeIP: true # (3) custom. - "10.6.1.0/24" ``` diff --git a/docs/concepts/Architecture.zh.md b/docs/concepts/Architecture.zh.md index 132c9254b..9de784d38 100644 --- a/docs/concepts/Architecture.zh.md +++ b/docs/concepts/Architecture.zh.md @@ -104,9 +104,9 @@ EgressGateway 由控制面和数据面 2 部分组成,控制面由 4 个控制 feature: egressIgnoreCIDR: autoDetect: - podCIDR: "" # 1 - clusterIP: true # 2 - nodeIP: true # 3 + podCIDR: "" # (1) + clusterIP: true # (2) + nodeIP: true # (3) custom: - "10.6.1.0/24" ``` diff --git a/docs/concepts/Datapath.zh.md b/docs/concepts/Datapath.zh.md index 5f39673f5..b36c93d86 100644 --- a/docs/concepts/Datapath.zh.md +++ b/docs/concepts/Datapath.zh.md @@ -136,5 +136,5 @@ 2. TABLE_NUM: - * 由于每个主机只能有 [0, 255] 张路由表(其中 0、253、254、255 已被系统使用),超出表的张数时,会导致节点路由没法计算,从而节点失联。而且表名与表的 ID 匹配,如果没有匹配,则内核会随机分配。所以为了保险起见,控制表的的张数(n 表示,默认值为 100)也就是网关节点的上限,可以通过变量设置。 - * TABLE_NUM 算法:用户可以设置一个起始值(s 表示,默认值为 3000),则表名的范围为 [s, (s+n)],用户需要保证 [s, (s+n)] 的表名没有被占用。随机从 [s, (s+n)] 取一个起始值,依次增加,环形取值,直到获得一个本节点未使用的表名,未找到则报错。 \ No newline at end of file + * 由于每个主机只能有 [0, 255] 张路由表(其中 0、253、254、255 已被系统使用),超出表的张数时,会导致节点路由没法计算,从而节点失联。而且表名与表的 ID 匹配,如果没有匹配,则内核会随机分配。所以为了保险起见,控制表的的张数(n 表示,默认值为 100)也就是网关节点的上限,可以通过变量设置。 + * TABLE_NUM 算法:用户可以设置一个起始值(s 表示,默认值为 3000),则表名的范围为 [s, (s+n)],用户需要保证 [s, (s+n)] 的表名没有被占用。随机从 [s, (s+n)] 取一个起始值,依次增加,环形取值,直到获得一个本节点未使用的表名,未找到则报错。 \ No newline at end of file diff --git a/docs/usage/Install.en.md b/docs/usage/Install.en.md index 8a29e0d9d..a01b11218 100644 --- a/docs/usage/Install.en.md +++ b/docs/usage/Install.en.md @@ -76,13 +76,13 @@ helm repo update --wait --debug ``` - In the installation command, please consider the following points: + In the installation command, please consider the following points: - * Make sure to provide the IPv4 and IPv6 subnets for the EgressGateway tunnel nodes in the installation command. These subnets should not conflict with other addresses within the cluster. - * You can customize the network interface used for EgressGateway tunnels by using the `--set feature.tunnelDetectMethod="interface=eth0"` option. By default, it uses the network interface associated with the default route. - * If you want to enable IPv6 support, set the `--set feature.enableIPv6=true` option and also `feature.tunnelIpv6Subnet`. - * The EgressGateway Controller supports high availability and can be configured using `--set controller.replicas=2`. - * To enable return routing rules on the gateway nodes, use `--set feature.enableGatewayReplyRoute=true`. This option is required when using Spiderpool to work with underlay CNI. + * Make sure to provide the IPv4 and IPv6 subnets for the EgressGateway tunnel nodes in the installation command. These subnets should not conflict with other addresses within the cluster. + * You can customize the network interface used for EgressGateway tunnels by using the `--set feature.tunnelDetectMethod="interface=eth0"` option. By default, it uses the network interface associated with the default route. + * If you want to enable IPv6 support, set the `--set feature.enableIPv6=true` option and also `feature.tunnelIpv6Subnet`. + * The EgressGateway Controller supports high availability and can be configured using `--set controller.replicas=2`. + * To enable return routing rules on the gateway nodes, use `--set feature.enableGatewayReplyRoute=true`. This option is required when using Spiderpool to work with underlay CNI. 2. Verify that all EgressGateway Pods are running properly. @@ -117,11 +117,11 @@ helm repo update EOF ``` - Descriptions: + Descriptions: - * In the provided YAML example, adjust `spec.ippools.ipv4` to define egress exit IP addresses based on your specific environment. - * Ensure that the CIDR of `spec.ippools.ipv4` matches the subnet of the egress interface on the gateway nodes (usually the interface associated with the default route). Mismatched subnets can cause connectivity issues for egress traffic. - * Use `spec.nodeSelector` in the EgressGateway to select a group of nodes as the egress gateway. You can select multiple nodes to achieve high availability. + * In the provided YAML example, adjust `spec.ippools.ipv4` to define egress exit IP addresses based on your specific environment. + * Ensure that the CIDR of `spec.ippools.ipv4` matches the subnet of the egress interface on the gateway nodes (usually the interface associated with the default route). Mismatched subnets can cause connectivity issues for egress traffic. + * Use `spec.nodeSelector` in the EgressGateway to select a group of nodes as the egress gateway. You can select multiple nodes to achieve high availability. 2. Label the egress gateway nodes by applying labels to them. For production environments, it is recommended to label at least 2 nodes. For POC environments, label 1 node. @@ -156,10 +156,10 @@ helm repo update status: Ready ``` - Descriptions: + Descriptions: - * The `status.nodeList` field indicates the nodes that match the `spec.nodeSelector`, along with the status of their corresponding EgressTunnel objects. - * The `spec.ippools.ipv4DefaultEIP` field randomly selects one IP address from `spec.ippools.ipv4` as the default VIP for this group of EgressGateways. This default VIP is used when creating EgressPolicy objects for applications that do not specify a VIP address. + * The `status.nodeList` field indicates the nodes that match the `spec.nodeSelector`, along with the status of their corresponding EgressTunnel objects. + * The `spec.ippools.ipv4DefaultEIP` field randomly selects one IP address from `spec.ippools.ipv4` as the default VIP for this group of EgressGateways. This default VIP is used when creating EgressPolicy objects for applications that do not specify a VIP address. ## Create Applications and Egress Policies @@ -189,13 +189,14 @@ helm repo update EOF ``` - Descriptions: + Descriptions: + + * `spec.egressGatewayName` specifies the name of the EgressGateway group to use. + * `spec.appliedTo.podSelector` determines which Pods within the cluster this policy should apply to. + * There are two options for the source IP address of egress traffic in the cluster: + * You can use the IP address of the gateway nodes. This is suitable for public clouds and traditional networks but has the downside of potential IP changes if a gateway node fails. You can enable this by setting `spec.egressIP.useNodeIP=true`. + * You can use a dedicated VIP. EgressGateway uses ARP principles for VIP implementation, making it suitable for traditional networks rather than public clouds. The advantage is that the egress source IP remains fixed. If no settings are specified in the EgressPolicy, the default VIP of the egressGatewayName will be used, or you can manually specify `spec.egressIP.ipv4` , which must match the IP pool configured in the EgressGateway. - * `spec.egressGatewayName` specifies the name of the EgressGateway group to use. - * `spec.appliedTo.podSelector` determines which Pods within the cluster this policy should apply to. - * There are two options for the source IP address of egress traffic in the cluster: - * You can use the IP address of the gateway nodes. This is suitable for public clouds and traditional networks but has the downside of potential IP changes if a gateway node fails. You can enable this by setting `spec.egressIP.useNodeIP=true`. - * You can use a dedicated VIP. EgressGateway uses ARP principles for VIP implementation, making it suitable for traditional networks rather than public clouds. The advantage is that the egress source IP remains fixed. If no settings are specified in the EgressPolicy, the default VIP of the egressGatewayName will be used, or you can manually specify `spec.egressIP.ipv4` , which must match the IP pool configured in the EgressGateway. 3. Check the status of the EgressPolicy ```shell @@ -223,14 +224,14 @@ helm repo update node: egressgateway-worker2 ``` - Descriptions: + Descriptions: - * `status.eip` displays the egress IP address used by the group of applications. - * `status.node` shows which EgressGateway node is responsible for real-time egress traffic forwarding. EgressGateway nodes support high availability. When multiple EgressGateway nodes exist, all EgressPolicy instances will be evenly distributed among them. + * `status.eip` displays the egress IP address used by the group of applications. + * `status.node` shows which EgressGateway node is responsible for real-time egress traffic forwarding. EgressGateway nodes support high availability. When multiple EgressGateway nodes exist, all EgressPolicy instances will be evenly distributed among them. 4. Check the status of EgressEndpointSlices. - Each EgressPolicy object has a corresponding EgressEndpointSlices that stores the IP collection of Pods selected by the EgressPolicy. If your application is unable to access external resources, you can check if the IP addresses in this object are correct. + Each EgressPolicy object has a corresponding EgressEndpointSlices that stores the IP collection of Pods selected by the EgressPolicy. If your application is unable to access external resources, you can check if the IP addresses in this object are correct. ```shell $ kubectl get egressendpointslices -A diff --git a/docs/usage/Install.zh.md b/docs/usage/Install.zh.md index c477d321a..e7de3a2f4 100644 --- a/docs/usage/Install.zh.md +++ b/docs/usage/Install.zh.md @@ -76,7 +76,7 @@ helm repo update --wait --debug ``` - 在安装命令中,有如下注意点: + 在安装命令中,有如下注意点: * 安装命令中,需要提供用于 EgressGateway 隧道节点的 IPv4 和 IPv6 网段,要求该网段和集群内的其他地址不冲突。 * 可使用选项 `--set feature.tunnelDetectMethod="interface=eth0"` 来定制 EgressGateway 隧道的承载网卡,否则,默认使用默认路由的网卡。 @@ -117,7 +117,7 @@ helm repo update EOF ``` - 创建命令中: + 创建命令中: * 如上 YAML 例子中,`spec.ippools.ipv4` 定义了一组 egress 的 出口 IP 地址,需要根据具体环境的实际情况调整。 * 其中,`spec.ippools.ipv4` 的 CIDR 应该是与网关节点上的出口网卡(一般情况下是默认路由的网卡)的子网相同,否则,极有可能导致 egress 访问不通。 @@ -156,7 +156,7 @@ helm repo update status: Ready ``` - 在如上输出中: + 在如上输出中: * `status.nodeList` 字段已经识别到了符合 `spec.nodeSelector` 的节点及该节点对应的 EgressTunnel 对象的状态 * `spec.ippools.ipv4DefaultEIP` 字段会从 `spec.ippools.ipv4` 中随机选择一个 IP 地址作为该组 EgressGateway 的默认 VIP,它的作用是:当为应用创建 EgressPolicy 对象时,如果未指定 VIP 地址,则默认分配使用该默认 VIP @@ -171,9 +171,9 @@ helm repo update 2. 为应用创建 EgressPolicy CR 对象。 - EgressPolicy 实例用于定义哪些 Pod 的出口流量要经过 EgressGateway 节点转发,以及其它的配置细节。 - 可创建如下例子,当匹配的 Pod 访问任意集群外部的地址(任意不是 Node IP、CNI Pod CIDR、ClusterIP 的地址)时,都会被 EgressGateway Node 转发。注意的是, - EgressPolicy 对象是租户级别的,因此,它务必创建在 selected 应用的租户下 + EgressPolicy 实例用于定义哪些 Pod 的出口流量要经过 EgressGateway 节点转发,以及其它的配置细节。 + 可创建如下例子,当匹配的 Pod 访问任意集群外部的地址(任意不是 Node IP、CNI Pod CIDR、ClusterIP 的地址)时,都会被 EgressGateway Node 转发。注意的是, + EgressPolicy 对象是租户级别的,因此,它务必创建在 selected 应用的租户下 ```shell cat <