Merge pull request #46224 from my-git9/pt-18157

[zh-cn]sync container-lifecycle-hooks configure-redis-using-configmap
pull/46245/head
Kubernetes Prow Robot 2024-05-07 02:19:12 -07:00 committed by GitHub
commit cc029e8966
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -98,16 +98,15 @@ There are three types of hook handlers that can be implemented for Containers:
Resources consumed by the command are counted against the Container.
* HTTP - Executes an HTTP request against a specific endpoint on the Container.
* Sleep - Pauses the container for a specified duration.
The "Sleep" action is available when the [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
`PodLifecycleSleepAction` is enabled.
This is a beta-level feature default enabled by the `PodLifecycleSleepAction` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
-->
* Exec - 在容器的 cgroups 和名字空间中执行特定的命令(例如 `pre-stop.sh`)。
命令所消耗的资源计入容器的资源消耗。
* HTTP - 对容器上的特定端点执行 HTTP 请求。
* Sleep - 将容器暂停一段指定的时间。
当[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/) `PodLifecycleSleepAction` 被启用时,
“Sleep” 操作才可用
这是由 `PodLifecycleSleepAction`
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)默认启用的 Beta 级特性
<!--
### Hook handler execution

View File

@ -1,6 +1,7 @@
---
title: 使用 ConfigMap 来配置 Redis
content_type: tutorial
weight: 30
---
<!--
reviewers:
@ -8,6 +9,7 @@ reviewers:
- pmorie
title: Configuring Redis using a ConfigMap
content_type: tutorial
weight: 30
-->
<!-- overview -->
@ -357,5 +359,7 @@ kubectl delete pod/redis configmap/example-redis-config
<!--
* Learn more about [ConfigMaps](/docs/tasks/configure-pod-container/configure-pod-configmap/).
* Follow an example of [Updating configuration via a ConfigMap](/docs/tutorials/configuration/updating-configuration-via-a-configmap/).
-->
* 了解有关 [ConfigMap](/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap/) 的更多信息。
* 学习[通过 ConfigMap 更新配置](/zh-cn/docs/tutorials/configuration/updating-configuration-via-a-configmap/)的示例。