Update custom-resource-definition-versioning.md

Since there can be only one version that needs to be stored and storage option is required else the parsing fails. Adding the storage option and setting it false.

Schema Vaildation fails with error: error validating data: ValidationError(CustomResourceDefinition.spec.versions[1]): missing
 required field "storage" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion; if you choose to
 ignore these errors, turn validation off with --validate=false
pull/37284/head
Chandan Singh 2022-10-12 18:13:03 +05:30 committed by GitHub
parent 7515fc673e
commit 8b1209d948
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -297,11 +297,13 @@ spec:
versions:
- name: v1alpha1
served: true
storage: false
# This indicates the v1alpha1 version of the custom resource is deprecated.
# API requests to this version receive a warning header in the server response.
deprecated: true
# This overrides the default warning returned to API clients making v1alpha1 API requests.
deprecationWarning: "example.com/v1alpha1 CronTab is deprecated; see http://example.com/v1alpha1-v1 for instructions to migrate to example.com/v1 CronTab"
schema: ...
- name: v1beta1
served: true
@ -334,6 +336,7 @@ spec:
versions:
- name: v1alpha1
served: true
storage: false
# This indicates the v1alpha1 version of the custom resource is deprecated.
# API requests to this version receive a warning header in the server response.
deprecated: true