---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: lrps.eirini.cloudfoundry.org
spec:
  group: eirini.cloudfoundry.org
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              required:
                - diskMB
              properties:
                GUID:
                  type: string
                version:
                  type: string
                processType:
                  type: string
                appGUID:
                  type: string
                appName:
                  type: string
                spaceName:
                  type: string
                spaceGUID:
                  type: string
                orgName:
                  type: string
                orgGUID:
                  type: string
                image:
                  type: string
                command:
                  type: array
                  items:
                    type: string
                ports:
                  type: array
                  items:
                    type: integer
                    format: int32
                volumeMounts:
                  type: array
                  items:
                    type: object
                    properties:
                      mountPath:
                        type: string
                      claimName:
                        type: string
                env:
                  type: object
                  additionalProperties:
                    type: string
                instances:
                  type: integer
                lastUpdated:
                  type: string
                memoryMB:
                  type: integer
                  format: int64
                diskMB:
                  type: integer
                  format: int64
                  minimum: 1
                cpuWeight:
                  type: integer
                  format: uint8
                runsAsRoot:
                  type: boolean
                appRoutes:
                  type: array
                  items:
                    type: object
                    properties:
                      hostname:
                        type: string
                      port:
                        type: integer
                        format: in32
                userDefinedAnnotations:
                  type: object
                  additionalProperties:
                    type: string
                privateRegistry:
                  type: object
                  properties:
                    server:
                      type: string
                    username:
                      type: string
                    password:
                      type: string
                health:
                  type: object
                  properties:
                    type:
                      type: string
                    port:
                      type: integer
                      format: int32
                    endpoint:
                      type: string
                    timeoutMs:
                      type: integer
                      format: uint8
            status:
              type: object
              properties:
                replicas:
                  type: integer
                instances:
                  type: array
                  items:
                    type: object
                    properties:
                      since:
                        type: integer
                        format: uint64
                      index:
                        type: integer
                        format: uint32
                      state:
                        type: string
                        enum:
                        - Pending
                        - Running
                        - Failed
                        default: Pending
                      exitStatus:
                        type: integer
                        format: uint32
                      exitReason:
                        type: string
                      crashCount:
                        type: integer
                        format: uint64
                      crashTimestamp:
                        type: integer
                        format: uint64
      subresources:
        status: {}
  scope: Namespaced
  names:
    plural: lrps
    singular: lrp
    kind: LRP
    shortNames:
      - lrp
