Skip to content

Commit e2466ac

Browse files
committed
[zh] Fix typo in the number of types of hook handlers for Containers
Signed-off-by: Jongwoo Han <[email protected]>
1 parent b87d6e1 commit e2466ac

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

content/zh-cn/docs/concepts/containers/container-lifecycle-hooks.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -86,34 +86,40 @@ A more detailed description of the termination behavior can be found in
8686
### Hook handler implementations
8787
8888
Containers can access a hook by implementing and registering a handler for that hook.
89-
There are two types of hook handlers that can be implemented for Containers:
89+
There are three types of hook handlers that can be implemented for Containers:
9090
-->
9191
### 回调处理程序的实现
9292

9393
容器可以通过实现和注册该回调的处理程序来访问该回调。
94-
针对容器,有两种类型的回调处理程序可供实现
94+
针对容器,有三种类型的回调处理程序可供实现
9595

9696
<!--
9797
* Exec - Executes a specific command, such as `pre-stop.sh`, inside the cgroups and namespaces of the Container.
9898
Resources consumed by the command are counted against the Container.
9999
* HTTP - Executes an HTTP request against a specific endpoint on the Container.
100+
* Sleep - Pauses the container for a specified duration.
101+
The "Sleep" action is available when the [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
102+
`PodLifecycleSleepAction` is enabled.
100103
-->
101104

102105
* Exec - 在容器的 cgroups 和名字空间中执行特定的命令(例如 `pre-stop.sh`)。
103106
命令所消耗的资源计入容器的资源消耗。
104107
* HTTP - 对容器上的特定端点执行 HTTP 请求。
108+
* Sleep - 将容器暂停一段指定的时间。
109+
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/) `PodLifecycleSleepAction` 被启用时,
110+
“Sleep” 操作才可用。
105111

106112
<!--
107113
### Hook handler execution
108114
109115
When a Container lifecycle management hook is called,
110116
the Kubernetes management system executes the handler according to the hook action,
111-
`httpGet` and `tcpSocket` are executed by the kubelet process, and `exec` is executed in the container.
117+
`httpGet` , `tcpSocket` and `sleep` are executed by the kubelet process, and `exec` is executed in the container.
112118
-->
113119
### 回调处理程序执行
114120

115121
当调用容器生命周期管理回调时,Kubernetes 管理系统根据回调动作执行其处理程序,
116-
`httpGet``tcpSocket` kubelet 进程执行,而 `exec` 则由容器内执行
122+
`httpGet``tcpSocket``sleep` kubelet 进程执行,而 `exec` 在容器中执行
117123

118124
<!--
119125
Hook handler calls are synchronous within the context of the Pod containing the Container.

0 commit comments

Comments
 (0)