apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: networktestrequests.clusterloader.io
spec:
  group: clusterloader.io
  scope: Namespaced
  names:
    plural: networktestrequests
    singular: networktestrequest
    kind: NetworkTestRequest
  versions: 
    - name: v1alpha1
      served: true
      storage: true
      schema:      
        openAPIV3Schema:
          type: object
          required: [spec, status]
          properties:
            spec:
              type: object 
              required: [clientPodName,serverPodName,serverPodIP,protocol,duration,clientStartTimestamp,numberOfClients]
              properties:
                clientPodName:
                  type: string
                  minimum: 1
                serverPodName:
                  type: string
                  minimum: 1
                serverPodIP:
                  type: string
                  minimum: 1
                protocol:
                  type: string
                  minimum: 1 
                duration:
                  type: integer
                  minimum: 1              
                clientStartTimestamp:
                  type: integer
                  minimum: 1 
                numberOfClients:
                  type: integer
                  minimum: 1 
            status:
              type: object 
              properties:
                metrics:
                   type: array
                   items:
                     type: number
                error:
                   type: string
                workerDelay:
                   type: number
