Update CRDs from v1beta1
$ vi config/crd/bases/<your CRD filename>---
#change the apiVersion
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: mongodbs.database.dhoover103.com
spec:
group: database.dhoover103.com
names:
kind: MongoDB
listKind: MongoDBList
plural: mongodbs
singular: mongodb
scope: Namespaced
versions:
- name: v1alpha1
served: true
storage: true
# Pull out the per-verison schema and define it globally instead
# Note that the "schema" line changes to "validation"
# Make sure the new section lines up correctly - one less indent (2 fewer spaces)
validation:
openAPIV3Schema:
description: MongoDB is the Schema for the mongodbs API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: Spec defines the desired state of MongoDB
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: Status defines the observed state of MongoDB
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
# The subresources stay where they are
subresources:
status: {}
# Add a "version" section. This must match the name of your first listed version
version: v1alpha1
Last updated