---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: foos.imjasonh.com
spec:
  group: imjasonh.com
  names:
    kind: Foo
    plural: foos
    shortNames: []
    singular: foo
  scope: Namespaced
  versions:
    - additionalPrinterColumns:
        - description: "whether it's good"
          jsonPath: ".status.conditions[?(@.type==\"Good\")].status"
          name: Good
          type: string
        - description: "reason it's good or not"
          jsonPath: ".status.conditions[?(@.type==\"Good\")].reason"
          name: Reason
          type: string
      name: v1alpha1
      schema:
        openAPIV3Schema:
          description: "Auto-generated derived type for FooSpec via `CustomResource`"
          properties:
            spec:
              description: Our Foo custom resource spec
              properties:
                name:
                  type: string
              required:
                - name
              type: object
            status:
              nullable: true
              properties:
                conditions:
                  items:
                    properties:
                      message:
                        type: string
                      reason:
                        type: string
                      severity:
                        enum:
                          - ""
                          - Warning
                          - Info
                        type: string
                      status:
                        enum:
                          - "True"
                          - "False"
                          - Unknown
                        type: string
                      type:
                        enum:
                          - Good
                        type: string
                    required:
                      - message
                      - reason
                      - severity
                      - status
                      - type
                    type: object
                  type: array
              required:
                - conditions
              type: object
          required:
            - spec
          title: Foo
          type: object
      served: true
      storage: true
      subresources:
        status: {}

