Skip to content

Commit fb1a0ca

Browse files
committed
Address feedback
1 parent a51a653 commit fb1a0ca

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,18 @@ CustomResourceDefinitions store validated resource data in the cluster's persist
314314
{{< note >}}
315315
CRDs converted from `apiextensions.k8s.io/v1beta1` to `apiextensions.k8s.io/v1` might lack structural schemas, and `spec.preserveUnknownFields` might be `true`.
316316

317-
For legacy CustomResourceDefinitions created as `apiextensions.k8s.io/v1beta1` where spec.preserveUnknownFields is set to true, pruning is not enabled and you can store arbitrary data. For compatibility with `apiextensions.k8s.io/v1`, you should update your custom resources definition to (1) have a structural OpenAPI schema, and (2) you should set spec.preserveUnknownFields to false. In Kubernetes 1.22 the `apiextensions.k8s.io/v1beta1` API will be removed, and every CustomResourceDefinition must be created via `apiextensions/v1`, and this enforces both (1) and (2).
317+
For legacy CustomResourceDefinition objects created as
318+
`apiextensions.k8s.io/v1beta1` with `spec.preserveUnknownFields` set to
319+
`true`, the following is also true:
320+
321+
* Pruning is not enabled.
322+
* You can store arbitrary data.
323+
324+
For compatibility with `apiextensions.k8s.io/v1`, update your custom
325+
resource definitions to:
326+
327+
1. Use a structural OpenAPI schema.
328+
2. Set `spec.preserveUnknownFields` to `false`.
318329
{{< /note >}}
319330

320331
If you save the following YAML to `my-crontab.yaml`:

0 commit comments

Comments
 (0)