Skip to content

Commit 4813a4f

Browse files
committed
[zh-cn]sync cri
Signed-off-by: xin.li <[email protected]>
1 parent af86a28 commit 4813a4f

File tree

2 files changed

+64
-37
lines changed

2 files changed

+64
-37
lines changed

content/zh-cn/docs/concepts/architecture/cri.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: 容器运行时接口(CRI)
33
content_type: concept
44
weight: 60
55
---
6-
76
<!--
87
title: Container Runtime Interface (CRI)
98
content_type: concept
@@ -27,9 +26,13 @@ CRI 是一个插件接口,它使 kubelet 能够使用各种容器运行时,
2726
这样 {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} 能启动
2827
{{< glossary_tooltip text="Pod" term_id="pod" >}} 及其容器。
2928

29+
<!--
30+
{{< glossary_definition prepend="The Container Runtime Interface (CRI) is" term_id="cri" length="all" >}}
31+
-->
3032
{{< glossary_definition prepend="容器运行时接口(CRI)是" term_id="cri" length="all" >}}
3133

3234
<!-- body -->
35+
3336
<!--
3437
## The API {#api}
3538
-->
@@ -46,7 +49,8 @@ runtime, which can be configured separately within the kubelet by using the
4649
-->
4750
当通过 gRPC 连接到容器运行时,kubelet 将充当客户端。运行时和镜像服务端点必须在容器运行时中可用,
4851
可以使用 `--container-runtime-endpoint`
49-
[命令行标志](/zh-cn/docs/reference/command-line-tools-reference/kubelet)在 kubelet 中单独配置。
52+
[命令行标志](/zh-cn/docs/reference/command-line-tools-reference/kubelet)
53+
kubelet 中单独配置。
5054

5155
<!--
5256
For Kubernetes v1.26 and later, the kubelet requires that the container runtime
@@ -71,12 +75,13 @@ container runtime is correctly configured.
7175

7276
在节点上升级 Kubernetes 版本时,kubelet 会重新启动。
7377
如果容器运行时不支持 `v1` 版本的 CRI API,kubelet 将无法注册节点并报告错误。
74-
如果由于容器运行时已升级而需要重新建立 gRPC 连接,则该容器运行时必须支持 v1 版本的 CRI API,连接才能成功。
78+
如果由于容器运行时已升级而需要重新建立 gRPC 连接,
79+
则该容器运行时必须支持 v1 版本的 CRI API,连接才能成功。
7580
在容器运行时正确配置后,可能需要重新启动 kubelet 才能建立连接。
7681

7782
## {{% heading "whatsnext" %}}
7883

7984
<!--
80-
- Learn more about the CRI [protocol definition](https://github.com/kubernetes/cri-api/blob/c75ef5b/pkg/apis/runtime/v1/api.proto)
85+
- Learn more about the CRI [protocol definition](https://github.com/kubernetes/cri-api/blob/v0.33.1/pkg/apis/runtime/v1/api.proto)
8186
-->
8287
- 了解更多有关 CRI [协议定义](https://github.com/kubernetes/cri-api/blob/v0.33.1/pkg/apis/runtime/v1/api.proto)

content/zh-cn/docs/reference/config-api/apiserver-eventratelimit.v1alpha1.md

Lines changed: 55 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ package: eventratelimit.admission.k8s.io/v1alpha1
1313

1414
## `Configuration` {#eventratelimit-admission-k8s-io-v1alpha1-Configuration}
1515

16+
<p>
1617
<!--
17-
<p>Configuration provides configuration for the EventRateLimit admission
18-
controller.</p>
18+
Configuration provides configuration for the EventRateLimit admission
19+
controller.
1920
-->
20-
<p>Configuration 为 EventRateLimit 准入控制器提供配置数据。</p>
21+
Configuration 为 EventRateLimit 准入控制器提供配置数据。
22+
</p>
2123

2224
<table class="table">
2325
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
@@ -26,19 +28,21 @@ controller.</p>
2628
<tr><td><code>apiVersion</code><br/>string</td><td><code>eventratelimit.admission.k8s.io/v1alpha1</code></td></tr>
2729
<tr><td><code>kind</code><br/>string</td><td><code>Configuration</code></td></tr>
2830

29-
<tr><td><code>limits</code> <B>[Required]</B><br/>
31+
<tr><td><code>limits</code> <B><!--[Required]-->[必需]</B><br/>
3032
<a href="#eventratelimit-admission-k8s-io-v1alpha1-Limit"><code>[]Limit</code></a>
3133
</td>
3234
<td>
35+
<p>
3336
<!--
34-
<p>limits are the limits to place on event queries received.
37+
limits are the limits to place on event queries received.
3538
Limits can be placed on events received server-wide, per namespace,
3639
per user, and per source+object.
37-
At least one limit is required.</p>
40+
At least one limit is required.
3841
-->
39-
<p>limits 是为所接收到的事件查询设置的限制。可以针对服务器端接收到的事件设置限制,
42+
<code>limits</code> 是为所接收到的事件查询设置的限制。可以针对服务器端接收到的事件设置限制,
4043
按逐个名字空间、逐个用户、或逐个来源+对象组合的方式均可以。
41-
至少需要设置一种限制。</p>
44+
至少需要设置一种限制。
45+
</p>
4246
</td>
4347
</tr>
4448
</tbody>
@@ -53,10 +57,12 @@ At least one limit is required.</p>
5357

5458
- [Configuration](#eventratelimit-admission-k8s-io-v1alpha1-Configuration)
5559

60+
<p>
5661
<!--
57-
<p>Limit is the configuration for a particular limit type</p>
62+
Limit is the configuration for a particular limit type
5863
-->
59-
<p>Limit 是为特定限制类型提供的配置数据。</p>
64+
<code>Limit</code> 是为特定限制类型提供的配置数据。
65+
</p>
6066

6167
<table class="table">
6268
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
@@ -66,33 +72,38 @@ At least one limit is required.</p>
6672
<a href="#eventratelimit-admission-k8s-io-v1alpha1-LimitType"><code>LimitType</code></a>
6773
</td>
6874
<td>
69-
<!--
70-
<p>type is the type of limit to which this configuration applies</p>
71-
-->
72-
<p>type 是此配置所适用的限制的类型。</p>
75+
<p>
76+
<!--
77+
type is the type of limit to which this configuration applies
78+
-->
79+
<code>type</code> 是此配置所适用的限制的类型。
80+
</p>
7381
</td>
7482
</tr>
7583
<tr><td><code>qps</code> <B><!--[Required]-->[必需]</B><br/>
7684
<code>int32</code>
7785
</td>
7886
<td>
87+
<p>
7988
<!--
80-
<p>qps is the number of event queries per second that are allowed for this
89+
qps is the number of event queries per second that are allowed for this
8190
type of limit. The qps and burst fields are used together to determine if
8291
a particular event query is accepted. The qps determines how many queries
83-
are accepted once the burst amount of queries has been exhausted.</p>
92+
are accepted once the burst amount of queries has been exhausted.
8493
-->
85-
<p>qps 是针对此类型的限制每秒钟所允许的事件查询次数。qps 和 burst
94+
<code>qps</code> 是针对此类型的限制每秒钟所允许的事件查询次数。qps 和 burst
8695
字段一起用来确定是否特定的事件查询会被接受。qps 确定的是当超出查询数量的
87-
burst 值时可以接受的查询个数。</p>
96+
burst 值时可以接受的查询个数。
97+
</p>
8898
</td>
8999
</tr>
90100
<tr><td><code>burst</code> <B><!--[Required]-->[必需]</B><br/>
91101
<code>int32</code>
92102
</td>
93103
<td>
104+
<p>
94105
<!--
95-
<p>burst is the burst number of event queries that are allowed for this type
106+
burst is the burst number of event queries that are allowed for this type
96107
of limit. The qps and burst fields are used together to determine if a
97108
particular event query is accepted. The burst determines the maximum size
98109
of the allowance granted for a particular bucket. For example, if the burst
@@ -101,31 +112,42 @@ before blocking any queries. Every second, 3 more queries will be allowed.
101112
If some of that allowance is not used, then it will roll over to the next
102113
second, until the maximum allowance of 10 is reached.</p>
103114
-->
104-
<p>burst 是针对此类型限制的突发事件查询数量。qps 和 burst 字段一起使用可用来确定特定的事件查询是否被接受。
115+
burst 是针对此类型限制的突发事件查询数量。qps 和 burst 字段一起使用可用来确定特定的事件查询是否被接受。
105116
burst 字段确定针对特定的事件桶(bucket)可以接受的规模上限。
106117
例如,如果 burst 是 10,qps 是 3,那么准入控制器会在接收 10 个查询之后阻塞所有查询。
107118
每秒钟可以额外允许 3 个查询。如果这一限额未被用尽,则剩余的限额会被顺延到下一秒钟,
108-
直到再次达到 10 个限额的上限。</p>
119+
直到再次达到 10 个限额的上限。
120+
</p>
109121
</td>
110122
</tr>
111123
<tr><td><code>cacheSize</code><br/>
112124
<code>int32</code>
113125
</td>
114126
<td>
127+
<p>
115128
<!--
116-
<p>cacheSize is the size of the LRU cache for this type of limit. If a bucket
129+
cacheSize is the size of the LRU cache for this type of limit. If a bucket
117130
is evicted from the cache, then the allowance for that bucket is reset. If
118131
more queries are later received for an evicted bucket, then that bucket
119132
will re-enter the cache with a clean slate, giving that bucket a full
120-
allowance of burst queries.</p>
121-
<p>The default cache size is 4096.</p>
122-
<p>If limitType is 'server', then cacheSize is ignored.</p>
133+
allowance of burst queries.
123134
-->
124-
<p>cacheSize 是此类型限制的 LRU 缓存的规模。如果某个事件桶(bucket)被从缓存中剔除,
135+
<code>cacheSize</code> 是此类型限制的 LRU 缓存的规模。如果某个事件桶(bucket)被从缓存中剔除,
125136
该事件桶所对应的限额也会被重置。如果后来再次收到针对某个已被剔除的事件桶的查询,
126-
则该事件桶会重新以干净的状态进入缓存,因而获得全量的突发查询配额。</p>
127-
<p>默认的缓存大小是 4096。</p>
128-
<p>如果 limitType 是 “server”,则 cacheSize 设置会被忽略。</p>
137+
则该事件桶会重新以干净的状态进入缓存,因而获得全量的突发查询配额。
138+
</p>
139+
<p>
140+
<!--
141+
The default cache size is 4096.
142+
-->
143+
默认的缓存大小是 4096。
144+
</p>
145+
<p>
146+
<!--
147+
If limitType is 'server', then cacheSize is ignored.
148+
-->
149+
如果 limitType 是 “server”,则 cacheSize 设置会被忽略。
150+
</p>
129151
</td>
130152
</tr>
131153
</tbody>
@@ -144,9 +166,9 @@ allowance of burst queries.</p>
144166

145167
- [Limit](#eventratelimit-admission-k8s-io-v1alpha1-Limit)
146168

169+
<p>
147170
<!--
148-
<p>LimitType is the type of the limit (e.g., per-namespace)</p>
171+
LimitType is the type of the limit (e.g., per-namespace)
149172
-->
150-
<p>LimitType 是限制类型(例如:per-namespace)。</p>
151-
152-
173+
<code>LimitType</code> 是限制类型(例如:per-namespace,即按命名空间限制)。
174+
</p>

0 commit comments

Comments
 (0)