Merge pull request #49073 from my-git9/pp-31629

[zh-cn]sync custom-resources.md
pull/49076/head
Kubernetes Prow Robot 2024-12-13 13:18:26 +01:00 committed by GitHub
commit 4fdc1a7c73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 6 deletions

View File

@ -631,9 +631,8 @@ may also be used with field selectors when included in the `spec.versions[*].sel
<!--
The `spec.versions[*].selectableFields` field of a {{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}} may be used to
declare which other fields in a custom resource may be used in field selectors
with the feature of `CustomResourceFieldSelectors`
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) (This feature gate is enabled by default since Kubernetes v1.31).
declare which other fields in a custom resource may be used in field selectors.
The following example adds the `.spec.color` and `.spec.size` fields as
selectable fields.
-->
@ -642,9 +641,7 @@ selectable fields.
来使用此行为,然后将其应用到集群中的所有 CustomResourceDefinitions。
{{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}}
字段可以用来在启用了 `CustomResourceFieldSelectors`
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
(自 Kubernetes v1.31 起,此特性默认启用)的集群中控制哪些字段可以用在字段选择算符中。
字段可以用来控制哪些字段可以用在字段选择算符中。
以下示例将 `.spec.color``.spec.size` 字段添加为可选择字段。