apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    api-approved.openshift.io: https://github.com/openshift/api/pull/497
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
  name: clusteroperators.config.openshift.io
spec:
  group: config.openshift.io
  names:
    kind: ClusterOperator
    listKind: ClusterOperatorList
    plural: clusteroperators
    shortNames:
    - co
    singular: clusteroperator
  scope: Cluster
  versions:
  - additionalPrinterColumns:
    - description: The version the operator is at.
      jsonPath: .status.versions[?(@.name=="operator")].version
      name: Version
      type: string
    - description: Whether the operator is running and stable.
      jsonPath: .status.conditions[?(@.type=="Available")].status
      name: Available
      type: string
    - description: Whether the operator is processing changes.
      jsonPath: .status.conditions[?(@.type=="Progressing")].status
      name: Progressing
      type: string
    - description: Whether the operator is degraded.
      jsonPath: .status.conditions[?(@.type=="Degraded")].status
      name: Degraded
      type: string
    - description: The time the operator's Available status last changed.
      jsonPath: .status.conditions[?(@.type=="Available")].lastTransitionTime
      name: Since
      type: date
    name: v1
    schema:
      openAPIV3Schema:
        description: ClusterOperator is the Custom Resource object which holds the
          current state of an operator. This object is used by operators to convey
          their state to the rest of the cluster.
        type: object
        required:
        - spec
        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: spec holds configuration that could apply to any operator.
            type: object
          status:
            description: status holds the information about the state of an operator.  It
              is consistent with status information across the Kubernetes ecosystem.
            type: object
            properties:
              conditions:
                description: conditions describes the state of the operator's managed
                  and monitored components.
                type: array
                items:
                  description: ClusterOperatorStatusCondition represents the state
                    of the operator's managed and monitored components.
                  type: object
                  required:
                  - lastTransitionTime
                  - status
                  - type
                  properties:
                    lastTransitionTime:
                      description: lastTransitionTime is the time of the last update
                        to the current status property.
                      type: string
                      format: date-time
                    message:
                      description: message provides additional information about the
                        current condition. This is only to be consumed by humans.  It
                        may contain Line Feed characters (U+000A), which should be
                        rendered as new lines.
                      type: string
                    reason:
                      description: reason is the CamelCase reason for the condition's
                        current status.
                      type: string
                    status:
                      description: status of the condition, one of True, False, Unknown.
                      type: string
                    type:
                      description: type specifies the aspect reported by this condition.
                      type: string
              extension:
                description: extension contains any additional status information
                  specific to the operator which owns this status object.
                type: object
                nullable: true
                x-kubernetes-preserve-unknown-fields: true
              relatedObjects:
                description: 'relatedObjects is a list of objects that are "interesting"
                  or related to this operator.  Common uses are: 1. the detailed resource
                  driving the operator 2. operator namespaces 3. operand namespaces'
                type: array
                items:
                  description: ObjectReference contains enough information to let
                    you inspect or modify the referred object.
                  type: object
                  required:
                  - group
                  - name
                  - resource
                  properties:
                    group:
                      description: group of the referent.
                      type: string
                    name:
                      description: name of the referent.
                      type: string
                    namespace:
                      description: namespace of the referent.
                      type: string
                    resource:
                      description: resource of the referent.
                      type: string
              versions:
                description: versions is a slice of operator and operand version tuples.  Operators
                  which manage multiple operands will have multiple operand entries
                  in the array.  Available operators must report the version of the
                  operator itself with the name "operator". An operator reports a
                  new "operator" version when it has rolled out the new version to
                  all of its operands.
                type: array
                items:
                  type: object
                  required:
                  - name
                  - version
                  properties:
                    name:
                      description: name is the name of the particular operand this
                        version is for.  It usually matches container images, not
                        operators.
                      type: string
                    version:
                      description: version indicates which version of a particular
                        operand is currently being managed.  It must always match
                        the Available operand.  If 1.0.0 is Available, then this must
                        indicate 1.0.0 even if the operator is trying to rollout 1.1.0
                      type: string
    served: true
    storage: true
    subresources:
      status: {}
