Skip to content

Commit 57bc705

Browse files
committed
clarify that v1beta1 CRDs will have to opt-in pruning feature
1 parent 90f71be commit 57bc705

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

content/en/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,7 @@ OpenAPI v2 Publishing is available as beta since 1.15, and as alpha since 1.14.
873873
`CustomResourcePublishOpenAPI` feature must be enabled, which is the case automatically for many clusters for beta features. Please refer to the [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) documentation for more information.
874874
{{< /note >}}
875875

876-
With the OpenAPI v2 Publishing feature enabled, CustomResourceDefinition [OpenAPI v3 validation schemas](#validation) which are [structural](#specifying-a-structural-schema) are published as part
877-
of the [OpenAPI v2 spec](/docs/concepts/overview/kubernetes-api/#openapi-and-swagger-definitions) from Kubernetes API server.
876+
With the OpenAPI v2 Publishing feature enabled, CustomResourceDefinition [OpenAPI v3 validation schemas](#validation) which are [structural](#specifying-a-structural-schema) and [enable pruning](#preserving-unknown-fields) (opt-in in v1beta1, enabled by default in v1) are published as part of the [OpenAPI v2 spec](/docs/concepts/overview/kubernetes-api/#openapi-and-swagger-definitions) from Kubernetes API server. You need to opt in in v1beta1 CRDs with `spec.preserveUnknownFields: false`. v1 CRDs enable pruning by default.
878877

879878
[kubectl](/docs/reference/kubectl/overview) consumes the published schema to perform client-side validation (`kubectl create` and `kubectl apply`), schema explanation (`kubectl explain`) on custom resources. The published schema can be consumed for other purposes as well, like client generation or documentation.
880879

0 commit comments

Comments
 (0)