Skip to content

Commit fa47906

Browse files
authored
Merge pull request #47543 from my-git9/pp-21983
[zh-cn] sync custom-resources.md
2 parents f4d4d73 + eb6675d commit fa47906

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

content/zh-cn/docs/concepts/extend-kubernetes/api-extension/custom-resources.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -630,13 +630,10 @@ may also be used with field selectors when included in the `spec.versions[*].sel
630630
{{< feature-state feature_gate_name="CustomResourceFieldSelectors" >}}
631631

632632
<!--
633-
You need to enable the `CustomResourceFieldSelectors`
634-
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to
635-
use this behavior, which then applies to all CustomResourceDefinitions in your
636-
cluster.
637-
638633
The `spec.versions[*].selectableFields` field of a {{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}} may be used to
639-
declare which other fields in a custom resource may be used in field selectors.
634+
declare which other fields in a custom resource may be used in field selectors
635+
with the feature of `CustomResourceFieldSelectors`
636+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) (This feature gate is enabled by default since Kubernetes v1.31).
640637
The following example adds the `.spec.color` and `.spec.size` fields as
641638
selectable fields.
642639
-->
@@ -645,7 +642,10 @@ selectable fields.
645642
来使用此行为,然后将其应用到集群中的所有 CustomResourceDefinitions。
646643

647644
{{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}}
648-
`spec.versions[*].selectableFields` 字段可以用来声明可以在字段选择算符中使用定制资源中的其他哪些字段。
645+
字段可以用来在启用了 `CustomResourceFieldSelectors`
646+
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
647+
(自 Kubernetes v1.31 起,此特性默认启用)的集群中控制哪些字段可以用在字段选择算符中。
648+
649649
以下示例将 `.spec.color``.spec.size` 字段添加为可选择字段。
650650

651651
{{% code_sample file="customresourcedefinition/shirt-resource-definition.yaml" %}}

0 commit comments

Comments
 (0)