---
# Source: olm/templates/0000_50_olm_06-catalogsource.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: catalogsources.operators.coreos.com
  annotations:
    displayName: CatalogSource
    description: A source configured to find packages and updates.
spec:
  group: operators.coreos.com
  version: v1alpha1
  versions:
  - name: v1alpha1
    served: true
    storage: true
  scope: Namespaced
  names:
    plural: catalogsources
    singular: catalogsource
    kind: CatalogSource
    listKind: CatalogSourceList
    shortNames:
    - catsrc
    categories:
    - olm
  additionalPrinterColumns:
  - name: Name
    type: string
    description: The pretty name of the catalog
    JSONPath: .spec.displayName
  - name: Type
    type: string
    description: The type of the catalog
    JSONPath: .spec.sourceType
  - name: Publisher
    type: string
    description: The publisher of the catalog
    JSONPath: .spec.publisher
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  subresources:
  # status enables the status subresource.
    status: {}
  validation:
    openAPIV3Schema:
      description: A source configured to find packages and updates.
      properties:
        spec:
          type: object
          description: Spec for a catalog source.
          required:
          - sourceType
          properties:
            sourceType:
              type: string
              description: The type of the source. `configmap` is the new name for `internal`
              enum:
              - internal   # deprecated
              - configmap
              - grpc

            configMap:
              type: string
              description: The name of a ConfigMap that holds the entries for an in-memory catalog.

            address:
              type: string
              description: An optional address. When set, directs OLM to connect to use a pre-existing registry server at this address.

            image:
              type: string
              description: An image that serves a grpc registry. Only valid for `grpc` sourceType. If both image and address are set, OLM does not use the address field.

            displayName:
              type: string
              description: Pretty name for display

            publisher:
              type: string
              description: The name of an entity that publishes this catalog

            secrets:
              type: array
              description: A set of secrets that can be used to access the contents of the catalog. It is best to keep this list small, since each will need to be tried for every catalog entry.
              items:
                type: string
                description: A name of a secret in the namespace where the CatalogSource is defined.
        status:
          type: object
          description: The status of the CatalogSource
          properties:
            configMapReference:
              type: object
              description: If sourceType is `internal` or `configmap`, then this holds a reference to the configmap associated with this CatalogSource.
              properties:
                name:
                  type: string
                  description: name of the configmap
                namespace:
                  type: string
                  description: namespace of the configmap
                resourceVersion:
                  type: string
                  description: resourceVersion of the configmap
                uid:
                  type: string
                  description: uid of the configmap
            registryService:
              type: object
              properties:
                protocol:
                  type: string
                  description: protocol of the registry service
                  enum:
                    - grpc
                serviceName:
                  type: string
                  description: name of the registry service
                serviceNamespace:
                  type: string
                  description: namespace of the registry service
                port:
                  type: string
                  description: port of the registry service
            lastSync:
                type: string
                description: the last time the catalog was updated. If this time is less than the last updated time on the object, the catalog will be re-cached.

