apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: registrationservices.toolchain.dev.openshift.com
spec:
  group: toolchain.dev.openshift.com
  names:
    kind: RegistrationService
    listKind: RegistrationServiceList
    plural: registrationservices
    shortNames:
    - rs
    singular: registrationservice
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.envVars.IMAGE
      name: Image
      type: string
    - jsonPath: .spec.envVars.ENVIRONMENT
      name: Environment
      type: string
    - jsonPath: .status.conditions[?(@.type=="Ready")].status
      name: Ready
      type: string
    - jsonPath: .status.conditions[?(@.type=="Ready")].reason
      name: Reason
      type: string
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: RegistrationService configures the registration service deployment
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: RegistrationServiceSpec defines the desired state of RegistrationService
            properties:
              environmentVariables:
                additionalProperties:
                  type: string
                description: The environment variables are supposed to be set to registration
                  service deployment template
                type: object
                x-kubernetes-map-type: atomic
            type: object
          status:
            description: RegistrationServiceStatus defines the observed state of RegistrationService
            properties:
              conditions:
                description: 'Conditions is an array of current Registration Service
                  deployment conditions Supported condition reasons: Deploying, and
                  Deployed'
                items:
                  properties:
                    lastTransitionTime:
                      description: Last time the condition transit from one status
                        to another.
                      format: date-time
                      type: string
                    lastUpdatedTime:
                      description: Last time the condition was updated
                      format: date-time
                      type: string
                    message:
                      description: Human readable message indicating details about
                        last transition.
                      type: string
                    reason:
                      description: (brief) reason for the condition's last transition.
                      type: string
                    status:
                      description: Status of the condition, one of True, False, Unknown.
                      type: string
                    type:
                      description: Type of condition
                      type: string
                  required:
                  - status
                  - type
                  type: object
                type: array
                x-kubernetes-list-map-keys:
                - type
                x-kubernetes-list-type: map
            type: object
        type: object
        x-kubernetes-preserve-unknown-fields: true
    served: true
    storage: true
    subresources:
      status: {}
