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
              properties:
                guid:
                  type: string
                version:
                  type: string
                processGUID:
                  type: string
                processType:
                  type: string
                appGUID:
                  type: string
                appName:
                  type: string
                spaceGUID:
                  type: string
                spaceName:
                  type: string
                orgGUID:
                  type: string
                orgName:
                  type: string
                placementTags:
                  type: array
                  items:
                    type: string
                ports:
                  type: array
                  items:
                    type: integer
                    format: int32
                routes:
                  type: object
                  additionalProperties:
                    type: array
                    items:
                      type: object
                      properties:
                        hostname:
                          type: string
                        port:
                          type: integer
                environment:
                  type: object
                  additionalProperties:
                    type: string
                egressRules:
                  type: array
                  items:
                    type: string
                instances:
                  type: integer
                lastUpdated:
                  type: string
                healthCheckType:
                  type: string
                healthCheckHTTPEndpoint:
                  type: string
                healthCheckTimeoutMs:
                  type: integer
                  format: uint32
                startTimeoutMs:
                  type: integer
                  format: uint32
                memoryMB:
                  type: integer
                  format: int64
                diskMB:
                  type: integer
                  format: int64
                cpuWeight:
                  type: integer
                  format: uint8
                volumeMounts:
                  type: array
                  items:
                    type: object
                    properties:
                      volumeID:
                        type: string
                      mountDir:
                        type: string
                lifecycle:
                  type: object
                  maxProperties: 1
                  properties:
                    docker:
                      type: object
                      properties:
                        image:
                          type: string
                        command:
                          type: array
                          items:
                            type: string
                        registryUsername:
                          type: string
                        registryPassword:
                          type: string
                          format: password
                    buildpack:
                      type: object
                      properties:
                        dropletHash:
                          type: string
                        dropletGUID:
                          type: string
                        startCommand:
                          type: string
                userDefinedAnnotations:
                  type: object
                  additionalProperties:
                    type: string
            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
