Skip to content

Commit 913d6d8

Browse files
authored
Merge pull request #44642 from windsonsea/feanew
[zh] Sync contribute/new-content/new-features.md
2 parents 2c579c8 + 0fba30a commit 913d6d8

File tree

1 file changed

+113
-20
lines changed

1 file changed

+113
-20
lines changed

content/zh-cn/docs/contribute/new-content/new-features.md

Lines changed: 113 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -242,31 +242,125 @@ Use their suggestions to get the content to a release ready state.
242242
为了确保技术准确性,内容可能还需要相应 SIG 的技术审核。
243243
尽量利用他们所给出的建议,改进文档内容以达到发布就绪状态。
244244

245+
<!--
246+
If your feature needs documentation and the first draft
247+
content is not received, the feature may be removed from the milestone.
248+
-->
249+
如果你的特性需要文档,而你未提交初版文档,那此特性可能会被从里程碑中移除。
250+
251+
<!--
252+
#### Feature gates {#ready-for-review-feature-gates}
253+
-->
254+
#### 特性门控 {#ready-for-review-feature-gates}
255+
245256
<!--
246257
If your feature is an Alpha or Beta feature and is behind a feature gate,
247-
make sure you add it to [Alpha/Beta Feature gates](/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features)
248-
table as part of your pull request. With new feature gates, a description of
249-
the feature gate is also required. If your feature is GA'ed or deprecated,
250-
make sure to move it from the
258+
you need a feature gate file for it inside
259+
`content/en/docs/reference/command-line-tools-reference/feature-gates/`.
260+
The name of the file should be the feature gate, converted from `UpperCamelCase`
261+
to `kebab-case`, with `.md` as the suffix.
262+
You can look at other files already in the same directory for a hint about what yours
263+
should look like. Usually a single paragraph is enough; for longer explanations,
264+
add documentation elsewhere and link to that.
265+
-->
266+
如果你在处理的特性处于 Alpha 或 Beta 阶段并由某特性门控控制,
267+
你需要在 `content/en/docs/reference/command-line-tools-reference/feature-gates/` 目录中为其创建一个特性门控文件。
268+
此文件的名称应该是特性门控的名称,此名称的式样从 `UpperCamelCase` 转换为 `kebab-case`,并以 `.md` 作为后缀。
269+
你可以参照同一目录中已存在的其他文件,以了解你的文件应该是什么样子的。
270+
通常一段话就够了;若要长篇阐述,请在其他地方添加文档,并为其添加链接。
271+
272+
<!--
273+
Also,
274+
to ensure your feature gate appears in the [Alpha/Beta Feature gates](/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features) table, include the following details
275+
in the [front matter](https://gohugo.io/content-management/front-matter/) of your Markdown
276+
description file:
277+
-->
278+
此外,为了确保你的特性门控出现在
279+
[Alpha/Beta 特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features)表格中,
280+
请在 Markdown 描述文件的 [Front Matter](https://gohugo.io/content-management/front-matter/) 中包含以下细节:
281+
282+
<!--
283+
```yaml
284+
stages:
285+
- stage: <alpha/beta/stable/deprecated> # Specify the development stage of the feature gate
286+
defaultValue: <true or false> # Set to true if enabled by default, false otherwise
287+
fromVersion: <Version> # Version from which the feature gate is available
288+
toVersion: <Version> # (Optional) The version until which the feature gate is available
289+
```
290+
-->
291+
```yaml
292+
stages:
293+
- stage: <alpha/beta/stable/deprecated> # 指定特性门控的开发阶段
294+
defaultValue: <true or false> # 如果默认启用,则设置为 true,否则为 false
295+
fromVersion: <Version> # 特性门控可用的起始版本
296+
toVersion: <Version> # (可选)特性门控可用的结束版本
297+
```
298+
299+
<!--
300+
With net new feature gates, a separate
301+
description of the feature gate is also required; create a new Markdown file
302+
inside `content/en/docs/reference/command-line-tools-reference/feature-gates/`
303+
(use other files as a template).
304+
-->
305+
对于全新的特性门控,还需要一个单独的特性门控描述;在
306+
`content/en/docs/reference/command-line-tools-reference/feature-gates/`
307+
目录中创建一个新的 Markdown 文件(把其他文件用作模板)。
308+
309+
<!--
310+
When you change a feature gate to disabled-by-default to enabled-by-default,
311+
you may also need to change other documentation (not just the list of
312+
feature gates). Watch out for language such as ”The `exampleSetting` field
313+
is a beta field and disabled by default. You can enable it by enabling the
314+
`ProcessExampleThings` feature gate.”
315+
-->
316+
当你将特性门控从默认禁用更改为默认启用时,你可能还需要更改其他文档(不仅仅是特性门控列表)。
317+
参照这样的话术 “`exampleSetting` 字段是一个 Beta 字段,默认禁用。
318+
你可以通过启用 `ProcessExampleThings` 特性门控来启用此字段。”
319+
320+
<!--
321+
If your feature is GA'ed or deprecated,
322+
include an additional `stage` entry within the `stages` block in the description file.
323+
Ensure that the Alpha and Beta stages remain intact.
324+
This step transitions the feature gate from the
251325
[Feature gates for Alpha/Feature](/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features) table
252-
to [Feature gates for graduated or deprecated features](/docs/reference/command-line-tools-reference/feature-gates-removed/#feature-gates-that-are-removed)
253-
table with Alpha and Beta history intact.
326+
to [Feature gates for graduated or deprecated features](/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-graduated-or-deprecated-features) table. For example:
254327
-->
255-
如果你在处理的功能特性处于 Alpha 或 Beta 阶段并由某特性门控控制,
256-
请确保在你的 PR 中,该特性门控被添加到
257-
[Alpha/Beta 特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features)表格中。
258-
对于新的特性门控选项,需要为该特性门控提供一段描述。
259-
如果所处理的功能特性已经进入正式发布(GA)状态或者被废弃,
260-
请确保将其从
261-
[Alpha 和 Beta 状态的特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features)表格迁移到
262-
[已毕业和已废弃的特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates-removed/#feature-gates-that-are-removed)
263-
并确保迁移后保留其 Alpha、Beta 版本变迁历史。
328+
如果你的特性已经是 GA(正式发布)或已弃用的,请在描述文件的 `stages` 块中包含一个额外的 `stage` 条目。
329+
确保 Alpha 和 Beta 阶段保持不变。这一步将特性门控从
330+
[Alpha/Beta 特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features)
331+
表格移到[已毕业或已弃用的特性门控](/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-graduated-or-deprecated-features)表格。例如:
264332

265-
<!--
266-
If your feature needs documentation and the first draft
267-
content is not received, the feature may be removed from the milestone.
333+
<!--
334+
# Added 'stable' stage block to existing stages.
268335
-->
269-
如果你的功能特性需要文档,而你未提交初版文档,该特性可能会被从里程碑中删除。
336+
{{< highlight yaml "linenos=false,hl_lines=10-15" >}}
337+
stages:
338+
- stage: alpha
339+
defaultValue: false
340+
fromVersion: "1.12"
341+
toVersion: "1.12"
342+
- stage: beta
343+
defaultValue: true
344+
fromVersion: "1.13"
345+
toVersion: "1.18"
346+
# 将 'stable' stage 代码块添加到了 stages 下
347+
- stage: stable
348+
defaultValue: true
349+
fromVersion: "1.19"
350+
toVersion: "1.27"
351+
{{< / highlight >}}
352+
353+
<!--
354+
Eventually, Kubernetes will stop including the feature gate at all. To signify the removal of a feature gate,
355+
include `removed: true` in the front matter of the respective description file.
356+
This action triggers the transition of the feature gate
357+
from [Feature gates for graduated or deprecated features](/docs/reference/command-line-tools-reference/feature-gates-removed/#feature-gates-that-are-removed) section to a dedicated page titled
358+
[Feature Gates (removed)](/docs/reference/command-line-tools-reference/feature-gates-removed/), including its description.
359+
-->
360+
最终,Kubernetes 将完全停止包含此特性门控。为了表示某特性门控已被移除,
361+
请在相应描述文件的 Front Matter 中包括 `removed: true`。
362+
此操作将使特性门控及其描述从[已毕业或已弃用的特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates-removed/#feature-gates-that-are-removed)
363+
部分移到名为[特性门控(已移除)](/zh-cn/docs/reference/command-line-tools-reference/feature-gates-removed/)的专用页面。
270364

271365
<!--
272366
### All PRs reviewed and ready to merge
@@ -281,4 +375,3 @@ milestone.
281375
如果你的 PR 在发行截止日期之前尚未合并到 `dev-{{< skew nextMinorVersion >}}` 分支,
282376
请与负责管理该发行版本的文档团队成员一起合作,在截止期限之前将其合并。
283377
如果功能特性需要文档,而文档并未就绪,该特性可能会被从里程碑中去除。
284-

0 commit comments

Comments
 (0)