apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: manifests.virtengine.network
spec:
  group: virtengine.network
  scope: Namespaced
  names:
    plural: manifests
    singular: manifest
    kind: Manifest
    shortNames:
      - mani
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                lease_id:
                  type: object
                  properties:
                    owner:
                      type: string
                    dseq:
                      type: string
                      format: uint64
                    gseq:
                      type: integer
                    oseq:
                      type: integer
                    provider:
                      type: string
                group:
                  type: object
                  properties:
                    name:
                      type: string
                    services:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          image:
                            type: string
                          args:
                            type: array
                            items:
                              type: string
                          env:
                            type: array
                            items:
                              type: string
                          unit:
                            type: object
                            properties:
                              cpu:
                                type: number
                                format: uint32
                              memory:
                                type: string
                                format: uint64
                              storage:
                                type: string
                                format: uint64
                          count:
                            type: number
                            format: uint64
                          expose:
                            type: array
                            items:
                              type: object
                              properties:
                                port:
                                  type: integer
                                  format: uint16
                                external_port:
                                  type: integer
                                  format: uint16
                                proto:
                                  type: string
                                service:
                                  type: string
                                global:
                                  type: boolean
                                hosts:
                                  type: array
                                  items:
                                    type: string

