@@ -90,10 +90,22 @@ rules:
9090<!--
9191## Metric lifecycle
9292
93- Alpha metric → Stable metric → Deprecated metric → Hidden metric → Deleted metric
93+ Alpha metric → Beta metric → Stable metric → Deprecated metric → Hidden metric → Deleted metric
9494
9595Alpha metrics have no stability guarantees. These metrics can be modified or deleted at any time.
9696
97+ Beta metrics observe a looser API contract than its stable counterparts. No labels can be removed from beta metrics during their lifetime, however, labels can be added while the metric is in the beta stage.
98+ -->
99+ ## 指标生命周期 {#metric-lifecycle}
100+
101+ Alpha 指标 → Beta 指标 → 稳定的指标 → 弃用的指标 → 隐藏的指标 → 删除的指标
102+
103+ Alpha 指标没有稳定性保证。这些指标可以随时被修改或者删除。
104+
105+ Beta 指标相比其稳定版本,所遵循的 API 协议更宽松。
106+ 在指标的 Beta 阶段生命周期内,其现有的标签不能被移除,但可以新增标签。
107+
108+ <!--
97109Stable metrics are guaranteed to not change. This means:
98110
99111* A stable metric without a deprecated signature will not be deleted or renamed
@@ -102,19 +114,13 @@ Stable metrics are guaranteed to not change. This means:
102114Deprecated metrics are slated for deletion, but are still available for use.
103115These metrics include an annotation about the version in which they became deprecated.
104116-->
105- ## 指标生命周期 {#metric-lifecycle}
106-
107- Alpha 指标 → 稳定的指标 → 弃用的指标 → 隐藏的指标 → 删除的指标
108-
109- Alpha 指标没有稳定性保证。这些指标可以随时被修改或者删除。
110-
111117稳定的指标可以保证不会改变。这意味着:
112118
113- * 稳定的、不包含已弃用(deprecated)签名的指标不会被删除(或重命名)
119+ * 稳定的、不包含已弃用(deprecated)签名的指标不会被删除或重命名
114120* 稳定的指标的类型不会被更改
115121
116122已弃用的指标最终将被删除,不过仍然可用。
117- 这类指标包含注解,标明其被废弃的版本 。
123+ 这类指标包含注解,标明其是在哪个版本被弃用的 。
118124
119125<!--
120126For example:
@@ -143,13 +149,26 @@ For example:
143149 ```
144150
145151<!--
146- Hidden metrics are no longer published for scraping, but are still available for use. To use a
147- hidden metric, please refer to the [Show hidden metrics](#show-hidden-metrics) section.
152+ Hidden metrics are no longer published for scraping, but are still available for use.
153+ A deprecated metric becomes a hidden metric after a period of time, based on its stability level:
154+ * **STABLE** metrics become hidden after a minimum of 3 releases or 9 months, whichever is longer.
155+ * **BETA** metrics become hidden after a minimum of 1 release or 4 months, whichever is longer.
156+ * **ALPHA** metrics can be hidden or removed in the same release in which they are deprecated.
157+
158+ To use a hidden metric, you must enable it. For more details, refer to the
159+ [Show hidden metrics](#show-hidden-metrics) section.
148160
149161Deleted metrics are no longer published and cannot be used.
150162-->
151163隐藏的指标不会再被发布以供抓取,但仍然可用。
152- 要使用隐藏指标,请参阅[ 显式隐藏指标] ( #show-hidden-metrics ) 节。
164+ 弃用的指标会根据其稳定性级别在一段时间后成为隐藏的指标。
165+
166+ * ** STABLE** 指标在弃用后至少 3 个发行版或 9 个月(以较长者为准)后变为隐藏。
167+ * ** BETA** 指标在弃用后至少 1 个发行版或 4 个月(以较长者为准)后变为隐藏。
168+ * ** ALPHA** 指标可以在其被弃用的同一发行版内就被隐藏或移除。
169+
170+ 要使用某个隐藏的指标,你必须先启用此指标。
171+ 更多细节请参阅[ 显示隐藏指标] ( #show-hidden-metrics ) 一节。
153172
154173删除的指标不再被发布,亦无法使用。
155174
@@ -176,34 +195,34 @@ patch release, the reason for that is the metrics deprecation policy runs agains
176195即使指标可能会在补丁程序发行版中弃用,原因是指标弃用策略规定仅针对次要版本。
177196
178197<!--
179- The flag can only take the previous minor version as it's value. All metrics hidden in previous
180- will be emitted if admins set the previous version to `show-hidden-metrics-for-version`. The too
181- old version is not allowed because this violates the metrics deprecated policy.
198+ The flag can only take the previous minor version as its value.
199+ If you want to show all metrics hidden in the previous release,
200+ you can set the `show-hidden-metrics-for-version` flag to the previous version.
201+ Using a version that is too old is not allowed because it violates the metrics deprecation policy.
182202
183- Take metric `A` as an example, here assumed that `A` is deprecated in 1.n. According to metrics
184- deprecated policy, we can reach the following conclusion :
203+ For example, let's assume metric `A` is deprecated in `1.29`.
204+ The version in which metric `A` becomes hidden depends on its stability level :
185205-->
186- 此参数的取值只能使用前一个次要版本。如果管理员将前一个版本设置为 ` show-hidden-metrics-for-version ` ,
187- 则前一个版本中隐藏的度量值会再度生成。不允许使用过旧的版本,因为那样会违反指标弃用策略。
206+ 此参数的取值只能使用前一个次要版本。如果你想显示前一发行版中隐藏的所有指标,你可以将
207+ ` show-hidden-metrics-for-version ` 参数设置为前一个版本。
208+ 不允许使用过旧的版本,因为那样会违反指标弃用策略。
188209
189- 以指标 ` A ` 为例,此处假设 ` A ` 在 ` 1.n ` 中已弃用。根据指标弃用策略,我们可以得出以下结论 :
210+ 例如,假设指标 ` A ` 在 ` 1.29 ` 中被弃用。指标 ` A ` 在哪个版本变为隐藏取决于其稳定性级别 :
190211
191212<!--
192- * In release `1.n`, the metric is deprecated, and it can be emitted by default.
193- * In release `1.n+1`, the metric is hidden by default and it can be emitted by command line
194- `show-hidden-metrics-for-version=1.n`.
195- * In release `1.n+2`, the metric should be removed from the codebase. No escape hatch anymore.
196-
197- If you're upgrading from release `1.12` to `1.13`, but still depend on a metric `A` deprecated in
198- `1.12`, you should set hidden metrics via command line: `--show-hidden-metrics=1.12` and remember
199- to remove this metric dependency before upgrading to `1.14`
213+ * If metric `A` is **ALPHA**, it could be hidden in `1.29`.
214+ * If metric `A` is **BETA**, it will be hidden in `1.30` at the earliest.
215+ If you are upgrading to `1.30` and still need `A`, you must use the
216+ command-line flag `--show-hidden-metrics-for-version=1.29`.
217+ * If metric `A` is **STABLE**, it will be hidden in `1.32` at the earliest.
218+ If you are upgrading to `1.32` and still need `A`, you must use the
219+ command-line flag `--show-hidden-metrics-for-version=1.31`.
200220-->
201- * 在版本 ` 1.n ` 中,这个指标已经弃用,且默认情况下可以生成。
202- * 在版本 ` 1.n+1 ` 中,这个指标默认隐藏,可以通过命令行参数 ` show-hidden-metrics-for-version=1.n ` 来再度生成。
203- * 在版本 ` 1.n+2 ` 中,这个指标就将被从代码中移除,不会再有任何逃生窗口。
204-
205- 如果你要从版本 ` 1.12 ` 升级到 ` 1.13 ` ,但仍依赖于 ` 1.12 ` 中弃用的指标 ` A ` ,则应通过命令行设置隐藏指标:
206- ` --show-hidden-metrics=1.12 ` ,并记住在升级到 ` 1.14 ` 版本之前移除此指标依赖项。
221+ * 如果指标 ` A ` 是 ** ALPHA** 指标,它可能会在 ` 1.29 ` 中被隐藏。
222+ * 如果指标 ` A ` 是 ** BETA** 指标,它最早会在 ` 1.30 ` 中被隐藏。如果你要升级到 ` 1.30 `
223+ 且仍然需要 ` A ` ,你必须使用命令行参数 ` --show-hidden-metrics-for-version=1.29 ` 。
224+ * 如果指标 ` A ` 是 ** STABLE(稳定)** 版本,它最早会在 ` 1.32 ` 中被隐藏。如果你要升级到 ` 1.32 `
225+ 且仍然需要 ` A ` ,你必须使用命令行参数 ` --show-hidden-metrics-for-version=1.31 ` 。
207226
208227<!--
209228## Component metrics
@@ -257,8 +276,8 @@ of all running pods. These metrics can be used to build capacity planning dashbo
257276current or historical scheduling limits, quickly identify workloads that cannot schedule due to
258277lack of resources, and compare actual usage to the pod's request.
259278-->
260- 调度器会暴露一些可选的指标,报告所有运行中 Pod 所请求的资源和期望的约束值 。
261- 这些指标可用来构造容量规划监控面板、访问调度约束的当前或历史数据 、
279+ 调度器会暴露一些可选的指标,报告所有运行中 Pod 所请求的资源和期望的限制值 。
280+ 这些指标可用来构造容量规划监控面板、访问当前或历史的调度限制值 、
262281快速发现因为缺少资源而无法被调度的负载,或者将 Pod 的实际资源用量与其请求值进行比较。
263282
264283<!--
@@ -274,10 +293,10 @@ metrics timeseries. The time series is labelled by:
274293- the name of the resource (for example, `cpu`)
275294- the unit of the resource if known (for example, `cores`)
276295-->
277- kube-scheduler 组件能够辩识各个 Pod 所配置的资源
278- [ 请求和约束 ] ( /zh-cn/docs/concepts/configuration/manage-resources-containers/ ) 。
279- 在 Pod 的资源请求值或者约束值非零时 ,kube-scheduler 会以度量值时间序列的形式
280- 生成报告。 该时间序列值包含以下标签:
296+ kube-scheduler 组件能够辩识各个 Pod
297+ 所配置的资源 [ 请求和限制 ] ( /zh-cn/docs/concepts/configuration/manage-resources-containers/ ) 。
298+ 在 Pod 的资源请求值或者限制值非零时 ,kube-scheduler 会以度量值时间序列的形式生成报告。
299+ 该时间序列值包含以下标签:
281300
282301- 名字空间
283302- Pod 名称
@@ -315,7 +334,7 @@ flag to expose these alpha stability metrics.
315334<!--
316335### kubelet Pressure Stall Information (PSI) metrics
317336-->
318- ### kubelet 压力阻塞信息(PSI)指标
337+ ### kubelet 压力阻塞信息(PSI)指标 {#kubelet-pressure-stall-information-psi-metrics}
319338
320339{{< feature-state for_k8s_version="v1.34" state="beta" >}}
321340
@@ -444,7 +463,8 @@ count of unexpected categorizations during cardinality enforcement, that is, whe
444463is encountered that is not allowed with respect to the allow-list constraints.
445464-->
446465此外,`cardinality_enforcement_unexpected_categorizations_total`
447- 元指标记录基数执行期间意外分类的计数,即每当遇到允许列表约束不允许的标签值时。
466+ 元指标记录基数执行期间意外分类的计数,
467+ 即每当遇到不在允许列表约束中的标签值时进行计数。
448468
449469# # {{% heading "whatsnext" %}}
450470
0 commit comments