apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: customkinds.customapp.ext.grafana.app
spec:
  group: customapp.ext.grafana.app
  names:
    kind: CustomKind
    plural: customkinds
  scope: Namespaced
  versions:
  - name: v0-0
    schema:
      openAPIV3Schema:
        properties:
          spec:
            properties:
              deprecatedField:
                type: string
              field1:
                type: string
            required:
            - field1
            - deprecatedField
            type: object
          status:
            properties:
              additionalFields:
                description: additionalFields is reserved for future use
                type: object
                x-kubernetes-preserve-unknown-fields: true
              operatorStates:
                additionalProperties:
                  properties:
                    descriptiveState:
                      description: descriptiveState is an optional more descriptive
                        state field which has no requirements on format
                      type: string
                    details:
                      description: details contains any extra information that is
                        operator-specific
                      type: object
                      x-kubernetes-preserve-unknown-fields: true
                    lastEvaluation:
                      description: lastEvaluation is the ResourceVersion last evaluated
                      type: string
                    state:
                      description: |-
                        state describes the state of the lastEvaluation.
                        It is limited to three possible states for machine evaluation.
                      enum:
                      - success
                      - in_progress
                      - failed
                      type: string
                  required:
                  - lastEvaluation
                  - state
                  type: object
                description: |-
                  operatorStates is a map of operator ID to operator state evaluations.
                  Any operator which consumes this kind SHOULD add its state evaluation information to this field.
                type: object
            type: object
        required:
        - spec
        type: object
    served: true
    storage: false
    subresources:
      status: {}
  - name: v1-0
    schema:
      openAPIV3Schema:
        properties:
          spec:
            properties:
              boolField:
                default: false
                type: boolean
              enum:
                default: default
                enum:
                - val1
                - val2
                - val3
                - val4
                - default
                type: string
              exclusiveInt:
                exclusiveMaximum: true
                exclusiveMinimum: true
                maximum: 100
                minimum: 10
                type: integer
              field1:
                type: string
              floatField:
                type: number
              i32:
                maximum: 123456
                type: integer
              i64:
                minimum: 123456
                type: integer
              inner:
                properties:
                  innerField1:
                    type: string
                  innerField2:
                    items:
                      type: string
                    type: array
                  innerField3:
                    items:
                      properties:
                        details:
                          type: object
                          x-kubernetes-preserve-unknown-fields: true
                        name:
                          type: string
                      required:
                      - name
                      - details
                      type: object
                    type: array
                  innerField4:
                    items:
                      type: object
                      x-kubernetes-preserve-unknown-fields: true
                    type: array
                required:
                - innerField1
                - innerField2
                - innerField3
                - innerField4
                type: object
              linkedList:
                properties:
                  next:
                    type: object
                    x-kubernetes-preserve-unknown-fields: true
                  val:
                    type: string
                required:
                - val
                type: object
              map:
                additionalProperties:
                  properties:
                    details:
                      type: object
                      x-kubernetes-preserve-unknown-fields: true
                    group:
                      type: string
                  required:
                  - group
                  - details
                  type: object
                type: object
              timestamp:
                format: date-time
                type: string
              union:
                oneOf:
                - not:
                    anyOf:
                    - required:
                      - details
                  required:
                  - group
                - required:
                  - group
                  - details
                properties:
                  details:
                    type: object
                    x-kubernetes-preserve-unknown-fields: true
                  group:
                    type: string
                  options:
                    items:
                      type: string
                    type: array
                type: object
            required:
            - field1
            - inner
            - union
            - map
            - timestamp
            - enum
            - i32
            - i64
            - boolField
            - floatField
            - linkedList
            - exclusiveInt
            type: object
          status:
            properties:
              additionalFields:
                description: additionalFields is reserved for future use
                type: object
                x-kubernetes-preserve-unknown-fields: true
              operatorStates:
                additionalProperties:
                  properties:
                    descriptiveState:
                      description: descriptiveState is an optional more descriptive
                        state field which has no requirements on format
                      type: string
                    details:
                      description: details contains any extra information that is
                        operator-specific
                      type: object
                      x-kubernetes-preserve-unknown-fields: true
                    lastEvaluation:
                      description: lastEvaluation is the ResourceVersion last evaluated
                      type: string
                    state:
                      description: |-
                        state describes the state of the lastEvaluation.
                        It is limited to three possible states for machine evaluation.
                      enum:
                      - success
                      - in_progress
                      - failed
                      type: string
                  required:
                  - lastEvaluation
                  - state
                  type: object
                description: |-
                  operatorStates is a map of operator ID to operator state evaluations.
                  Any operator which consumes this kind SHOULD add its state evaluation information to this field.
                type: object
              statusField1:
                type: string
            required:
            - statusField1
            type: object
            x-kubernetes-preserve-unknown-fields: true
        required:
        - spec
        type: object
    served: true
    storage: true
    subresources:
      status: {}
