
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: externalservices.kubeovn.io
spec:
  scope: Namespaced
  group: kubeovn.io
  names:
    kind: ExternalService
    listKind: ExternalServiceList
    singular: externalservice
    plural: externalservices
    shortNames:
      - exsvc
  versions:
    - name: v1alpha1
      served: true
      storage: true
      additionalPrinterColumns:
        - name: Addresses
          type: string
          jsonPath: .spec.addresses
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              required:
                - addresses
              properties:
                addresses:
                  type: array
                  items:
                    type: string
                    format: "ip"
                ports:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      protocol:
                        type: string
                      port:
                        type: string
                        pattern: "^[0-9]+(-[0-9]+)?(,[0-9]+(-[0-9]+)?)*$"
                      bandwidth:
                        type: string
