From 063e320a1f4d9c2b3404de53cf84d5644cabd913 Mon Sep 17 00:00:00 2001 From: xin gu <418294249@qq.com> Date: Sat, 20 Apr 2024 11:24:42 +0800 Subject: [PATCH] sync configure-pod-configmap define-environment-variable-container horizontal-pod-autoscale --- .../configure-pod-container/configure-pod-configmap.md | 3 +++ .../define-environment-variable-container.md | 10 ++++++++++ .../tasks/run-application/horizontal-pod-autoscale.md | 6 +++--- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/content/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap.md b/content/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap.md index 13be9b0d17..7b792c3a38 100644 --- a/content/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap.md +++ b/content/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap.md @@ -1511,6 +1511,9 @@ or move it into the trash can / deleted files location. * 浏览[使用 ConfigMap 配置 Redis](/zh-cn/docs/tutorials/configuration/configure-redis-using-configmap/) 真实示例。 +* 参照一个[通过 ConfigMap 更新配置](/zh-cn/docs/tutorials/configuration/updating-configuration-via-a-configmap/) + 的示例. diff --git a/content/zh-cn/docs/tasks/inject-data-application/define-environment-variable-container.md b/content/zh-cn/docs/tasks/inject-data-application/define-environment-variable-container.md index b9a3a99cab..6545ca0cfe 100644 --- a/content/zh-cn/docs/tasks/inject-data-application/define-environment-variable-container.md +++ b/content/zh-cn/docs/tasks/inject-data-application/define-environment-variable-container.md @@ -173,6 +173,16 @@ as a CLI argument passed to the `env-print-demo` container. 环境变量 `MESSAGE` 将所有这些环境变量的集合组合起来, 然后再传递给容器 `env-print-demo` 的 CLI 参数中使用。 + +环境变量名由字母、数字、下划线、点或连字符组成,但第一个字符不能是数字。 +如果启用了 `RelaxedEnvironmentVariableValidation` 特性门控, +则所有可打印的 ASCII 字符("=" 除外)都可以用于环境变量名。 + ```yaml apiVersion: v1 kind: Pod diff --git a/content/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale.md b/content/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale.md index 3eb79f91da..72d817ad09 100644 --- a/content/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale.md +++ b/content/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale.md @@ -497,19 +497,19 @@ pod usage is still within acceptable limits. --> ### 容器资源指标 {#container-resource-metrics} -{{< feature-state for_k8s_version="v1.27" state="beta" >}} +{{< feature-state feature_gate_name="HPAContainerMetrics" >}} HorizontalPodAutoscaler API 也支持容器指标源,这时 HPA 可以跟踪记录一组 Pod 中各个容器的资源用量,进而触发扩缩目标对象的操作。 容器资源指标的支持使得你可以为特定 Pod 中最重要的容器配置规模扩缩阈值。 -例如,如果你有一个 Web 应用和一个执行日志操作的边车容器,你可以基于 Web +例如,如果你有一个 Web 应用和一个提供记录日志功能的边车容器,你可以基于 Web 应用的资源用量来执行扩缩,忽略边车容器的存在及其资源用量。