apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: apintoupstreams.apinto.com
spec:
  group: apinto.com
  scope: Namespaced
  names:
    plural: apintoupstreams
    singular: apintoupstream
    kind: ApintoUpstream
    shortNames:
      - au
  versions:
    - name: v1beta
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                driver:
                  type: string
                  enum:
                    - http_proxy
                desc:
                  type: string
                discovery:
                  type: string
                  pattern: '\w+(@discovery)$'
                config:
                  type: string
                  minLength: 1
                scheme:
                  type: string
                  enum:
                    - http
                    - https
                "type":
                  type: string
                  enum:
                    - round_robin
                plugins:
                  type: object
                  nullable: true
                  x-kubernetes-preserve-unknown-fields: true
              required: ["name","driver","discovery","config","scheme","type"]