apiVersion: apiextensions.k8s.io/v1 
kind: CustomResourceDefinition
metadata:
  # name must match <plural>.<group>
  name: foos.demos.fearofoblivion.com
spec:
  scope: Namespaced
  # group name to use for REST API: /apis/<group>/<version>
  group: demos.fearofoblivion.com
  names:
    kind: Foo
    singular: foo
    plural: foos
    ## shortNames allow shorter string to match your resource on the CLI
    # shortNames:
    # - foo
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          description: "A foo object"
          properties:
            spec:
              type: object
              properties:
                value1:
                  type: string
                value2:
                  type: string
                  pattern: "^[a-zA-Z0-9]+"
                value3:
                  type: integer
                value4:
                  type: integer
                  minimum: 1
                  maximum: 10
    