Skip to content

Commit 1e65fe2

Browse files
authored
Merge pull request #26145 from howieyuen/eps
[zh] resync content/zh/docs/concepts/services-networking/endpoint-slices.md
2 parents 1fc9554 + 786422b commit 1e65fe2

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

content/zh/docs/concepts/services-networking/endpoint-slices.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,115 @@ EndpointSlice 支持三种地址类型:
145145
* IPv6
146146
* FQDN (完全合格的域名)
147147

148+
<!--
149+
### Conditions
150+
151+
The EndpointSlice API stores conditions about endpoints that may be useful for consumers.
152+
The three conditions are `ready`, `serving`, and `terminating`.
153+
-->
154+
### 状况
155+
156+
EndpointSlice API 存储了可能对使用者有用的、有关端点的状况。
157+
这三个状况分别是 `ready`、`serving` 和 `terminating`。
158+
159+
160+
<!--
161+
#### Ready
162+
163+
`ready` is a condition that maps to a Pod's `Ready` condition. A running Pod with the `Ready`
164+
condition set to `True` should have this EndpointSlice condition also set to `true`. For
165+
compatibility reasons, `ready` is NEVER `true` when a Pod is terminating. Consumers should refer
166+
to the `serving` condition to inspect the readiness of terminating Pods. The only exception to
167+
this rule is for Services with `spec.publishNotReadyAddresses` set to `true`. Endpoints for these
168+
Services will always have the `ready` condition set to `true`.
169+
-->
170+
#### Ready(就绪)
171+
172+
`ready` 状况是映射 Pod 的 `Ready` 状况的。
173+
处于运行中的 Pod,它的 `Ready` 状况被设置为 `True`,应该将此 EndpointSlice 状况也设置为 `true`。
174+
出于兼容性原因,当 Pod 处于终止过程中,`ready` 永远不会为 `true`。
175+
消费者应参考 `serving` 状况来检查处于终止中的 Pod 的就绪情况。
176+
该规则的唯一例外是将 `spec.publishNotReadyAddresses` 设置为 `true` 的服务。
177+
这些服务(Service)的端点将始终将 `ready` 状况设置为 `true`。
178+
179+
<!--
180+
#### Serving
181+
182+
{{< feature-state for_k8s_version="v1.20" state="alpha" >}}
183+
184+
`serving` is identical to the `ready` condition, except it does not account for terminating states.
185+
Consumers of the EndpointSlice API should check this condition if they care about pod readiness while
186+
the pod is also terminating.
187+
-->
188+
#### Serving(服务中)
189+
190+
{{< feature-state for_k8s_version="v1.20" state="alpha" >}}
191+
192+
`serving` 状况与 `ready` 状况相同,不同之处在于它不考虑终止状态。
193+
如果 EndpointSlice API 的使用者关心 Pod 终止时的就绪情况,就应检查此状况。
194+
195+
{{< note >}}
196+
<!--
197+
Although `serving` is almost identical to `ready`, it was added to prevent break the existing meaning
198+
of `ready`. It may be unexpected for existing clients if `ready` could be `true` for terminating
199+
endpoints, since historically terminating endpoints were never included in the Endpoints or
200+
EndpointSlice API to begin with. For this reason, `ready` is _always_ `false` for terminating
201+
endpoints, and a new condition `serving` was added in v1.20 so that clients can track readiness
202+
for terminating pods independent of the existing semantics for `ready`.
203+
-->
204+
尽管 `serving` 与 `ready` 几乎相同,但是它是为防止破坏 `ready` 的现有含义而增加的。
205+
如果对于处于终止中的端点,`ready` 可能是 `true`,那么对于现有的客户端来说可能是有些意外的,
206+
因为从始至终,Endpoints 或 EndpointSlice API 从未包含处于终止中的端点。
207+
出于这个原因,`ready` 对于处于终止中的端点 _总是_ `false`,
208+
并且在 v1.20 中添加了新的状况 `serving`,以便客户端可以独立于 `ready`
209+
的现有语义来跟踪处于终止中的 Pod 的就绪情况。
210+
{{< /note >}}
211+
212+
<!--
213+
#### Terminating
214+
215+
{{< feature-state for_k8s_version="v1.20" state="alpha" >}}
216+
217+
`Terminating` is a condition that indicates whether an endpoint is terminating.
218+
For pods, this is any pod that has a deletion timestamp set.
219+
-->
220+
#### Terminating(终止中)
221+
222+
{{< feature-state for_k8s_version="v1.20" state="alpha" >}}
223+
224+
`Terminating` 是表示端点是否处于终止中的状况。
225+
对于 Pod 来说,这是设置了删除时间戳的 Pod。
226+
227+
148228
<!--
149229
### Topology information {#topology}
150230

231+
{{< feature-state for_k8s_version="v1.20" state="deprecated" >}}
232+
233+
{{< note >}}
234+
The topology field in EndpointSlices has been deprecated and will be removed in
235+
a future release. A new `nodeName` field will be used instead of setting
236+
`kubernetes.io/hostname` in topology. It was determined that other topology
237+
fields covering zone and region would be better represented as EndpointSlice
238+
labels that would apply to all endpoints within the EndpointSlice.
239+
{{< /note >}}
240+
151241
Each endpoint within an EndpointSlice can contain relevant topology information.
152242
This is used to indicate where an endpoint is, containing information about the
153243
corresponding Node, zone, and region. When the values are available, the
154244
control plane sets the following Topology labels for EndpointSlices:
155245
-->
156246
### 拓扑信息 {#topology}
157247

248+
{{< feature-state for_k8s_version="v1.20" state="deprecated" >}}
249+
250+
{{< note >}}
251+
EndpointSlices 中的 topology 字段已被弃用,并将在以后的版本中删除。
252+
将使用新的 `nodeName` 字段代替在 topology 中设置 `kubernetes.io/hostname`。
253+
可以确定的是,其他覆盖区和域的拓扑字段用 EndpointSlice 标签来表达更合适,
254+
该标签将应用于 EndpointSlice 内的所有端点。
255+
{{< /note >}}
256+
158257
EndpointSlice 中的每个端点都可以包含一定的拓扑信息。
159258
这一信息用来标明端点的位置,包含对应节点、可用区、区域的信息。
160259
当这些值可用时,控制面会为 EndpointSlice 设置如下拓扑标签:

0 commit comments

Comments
 (0)