From 8f1e1488642deb9905034d7ff8f0e82132b5f675 Mon Sep 17 00:00:00 2001 From: Joe Betz Date: Fri, 26 Jul 2024 19:53:58 -0400 Subject: [PATCH] KEP-4358: Custom Resource Field Selectors: Promote to Beta (#46980) * KEP-4358: Custom Resource Field Selectors: Promote to Beta * Update content/en/docs/reference/command-line-tools-reference/feature-gates/custom-resource-field-selectors.md Co-authored-by: Dipesh Rawat * Remove alpha level notes about enabling the feature * Update content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md Co-authored-by: Tim Bannister * Update content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md Co-authored-by: lakshmi prasuna <56723673+T-Lakshmi@users.noreply.github.com> * Update content/en/docs/concepts/extend-kubernetes/api-extension/custom-resources.md Co-authored-by: lakshmi prasuna <56723673+T-Lakshmi@users.noreply.github.com> --------- Co-authored-by: Dipesh Rawat Co-authored-by: Tim Bannister Co-authored-by: lakshmi prasuna <56723673+T-Lakshmi@users.noreply.github.com> --- .../api-extension/custom-resources.md | 9 +++------ .../custom-resource-field-selectors.md | 4 ++++ .../custom-resources/custom-resource-definitions.md | 13 +++++++------ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/content/en/docs/concepts/extend-kubernetes/api-extension/custom-resources.md b/content/en/docs/concepts/extend-kubernetes/api-extension/custom-resources.md index 819dbc306b..7e9f85443e 100644 --- a/content/en/docs/concepts/extend-kubernetes/api-extension/custom-resources.md +++ b/content/en/docs/concepts/extend-kubernetes/api-extension/custom-resources.md @@ -313,13 +313,10 @@ may also be used with field selectors when included in the `spec.versions[*].sel {{< feature-state feature_gate_name="CustomResourceFieldSelectors" >}} -You need to enable the `CustomResourceFieldSelectors` -[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to -use this behavior, which then applies to all CustomResourceDefinitions in your -cluster. - 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. +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). The following example adds the `.spec.color` and `.spec.size` fields as selectable fields. diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates/custom-resource-field-selectors.md b/content/en/docs/reference/command-line-tools-reference/feature-gates/custom-resource-field-selectors.md index 5ef021173f..77c579c748 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates/custom-resource-field-selectors.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates/custom-resource-field-selectors.md @@ -9,6 +9,10 @@ stages: - stage: alpha defaultValue: false fromVersion: "1.30" + toVersion: "1.30" + - stage: beta + defaultValue: true + fromVersion: "1.31" --- Enable `selectableFields` in the diff --git a/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md b/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md index 578843c0f6..b3c35664cc 100644 --- a/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md +++ b/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md @@ -1686,13 +1686,14 @@ may also be used with field selectors when included in the `spec.versions[*].sel {{< feature-state feature_gate_name="CustomResourceFieldSelectors" >}} -You need to enable the `CustomResourceFieldSelectors` -[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to -use this behavior, which then applies to all CustomResourceDefinitions in your -cluster. - +For Kubernetes {{< skew currentVersion >}} the ability to define field selectors for +custom resources is available by default (enabled by default since Kubernetes v1.31); +you can disable it for your cluster by turning off the `CustomResourceFieldSelectors` +[feature gate](/docs/reference/command-line-tools-reference/feature-gates/). 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. +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). The following example adds the `.spec.color` and `.spec.size` fields as selectable fields.