apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: beers.beerdb.fosdem.org
spec:
  group: beerdb.fosdem.org
  scope: Namespaced
  names:
    plural: beers
    singular: beer
    kind: Beer
  versions:
  - name: v1
    storage: true
    served: true
    schema:
      openAPIV3Schema:
        description: Beer is a beer sold by a brewery.
        type: object
        properties:
          alcohol:
            pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
            anyOf:
            - type: integer
            - type: string
            x-kubernetes-int-or-string: true
          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
          color:
            type: string
            default: unknown
            enum:
            - gold
            - yellow
            - blond
            - unknown
          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
