From 1ea8f96dbcf9a78a8b652db827cc3f5b556a1fe1 Mon Sep 17 00:00:00 2001 From: Nikhita Raghunath Date: Wed, 22 Aug 2018 00:27:46 +0530 Subject: [PATCH] Update docs for fields allowed at root of CRD schema (#9973) --- .../custom-resource-definitions.md | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/content/en/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions.md b/content/en/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions.md index 3292d07c0d..892f9f55e6 100644 --- a/content/en/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions.md +++ b/content/en/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions.md @@ -447,8 +447,9 @@ The column's `format` controls the style used when `kubectl` prints the value. ### Subresources +{{< feature-state state="beta" for_kubernetes_version="1.11" >}} + Custom resources support `/status` and `/scale` subresources. -This feature is __beta__ in v1.11 and enabled by default. You can disable this feature using the `CustomResourceSubresources` feature gate on the [kube-apiserver](/docs/admin/kube-apiserver): @@ -469,7 +470,28 @@ When the status subresource is enabled, the `/status` subresource for the custom - `PUT` requests to the `/status` subresource only validate the status stanza of the custom resource. - `PUT`/`POST`/`PATCH` requests to the custom resource ignore changes to the status stanza. - Any changes to the spec stanza increments the value at `.metadata.generation`. -- `properties`, `required` and `description` are the only constructs allowed in the root of the CRD OpenAPI validation schema. +- Only the following constructs are allowed at the root of the CRD OpenAPI validation schema: + + - Description + - Example + - ExclusiveMaximum + - ExclusiveMinimum + - ExternalDocs + - Format + - Items + - Maximum + - MaxItems + - MaxLength + - Minimum + - MinItems + - MinLength + - MultipleOf + - Pattern + - Properties + - Required + - Title + - Type + - UniqueItems #### Scale subresource