diff --git a/content/en/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definition-versioning.md b/content/en/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definition-versioning.md index 12c6f56972..50d68acc8f 100644 --- a/content/en/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definition-versioning.md +++ b/content/en/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definition-versioning.md @@ -217,6 +217,8 @@ metadata: spec: # group name to use for REST API: /apis// group: example.com + # prunes object fields that are not specified in OpenAPI schemas below. + preserveUnknownFields: false # list of versions supported by this CustomResourceDefinition versions: - name: v1beta1 @@ -228,6 +230,7 @@ spec: # schema is defined. schema: openAPIV3Schema: + type: object properties: hostPort: type: string @@ -236,6 +239,7 @@ spec: storage: false schema: openAPIV3Schema: + type: object properties: host: type: string