apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: cloudserviceaccountrequests.rhoas.redhat.com
spec:
  group: rhoas.redhat.com
  names:
    kind: CloudServiceAccountRequest
    plural: cloudserviceaccountrequests
    shortNames:
    - csar
    singular: cloudserviceaccountrequest
  scope: Namespaced
  versions:
  - name: v1alpha1
    served: true
    storage: true
    subresources:
      status: {}
    schema: 
      openAPIV3Schema:
        properties:
          spec:
            properties:
              serviceAccountName:
                type: string
              serviceAccountDescription:
                type: string
              serviceAccountSecretName:
                type: string
              accessTokenSecretName:
                type: string
            type: object
          status:
            properties:
              message:
                nullable: true
                type: string
              updated:
                nullable: true
                type: string
              serviceAccountSecretName:
                nullable: true
                type: string
              conditions:
                type: array
                nullable: true
                items:
                  type: object
                  properties:
                    type:
                      type: string
                    reason:
                      type: string
                    message:
                      type: string
                    status:
                      type: string
                    lastTransitionTime:
                      type: string
                    lastTransitionGeneration:
                      type: integer          
                      format: int64
                      nullable: true
            type: object
        type: object
