apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: tasks.eirini.cloudfoundry.org
spec:
  group: eirini.cloudfoundry.org
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              required:
                - guid
                - image
                - command
              properties:
                guid:
                  type: string
                name:
                  type: string
                image:
                  type: string
                completionCallback:
                  type: string
                privateRegistry:
                  type: object
                  properties:
                    server:
                      type: string
                    username:
                      type: string
                    password:
                      type: string
                env:
                  type: object
                  additionalProperties:
                    type: string
                command:
                  type: array
                  items:
                    type: string
                appName:
                  type: string
                appGuid:
                  type: string
                orgName:
                  type: string
                orgGuid:
                  type: string
                spaceName:
                  type: string
                spaceGuid:
                  type: string
                memoryMB:
                  type: integer
                  format: int64
                diskMB:
                  type: integer
                  format: int64
                cpuWeight:
                  type: integer
                  format: uint8
      subresources:
        status: {}
  scope: Namespaced
  names:
    plural: tasks
    singular: task
    kind: Task
    shortNames:
      - t
