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
    categories:
    - all
    - 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:
      properties:
        spec:
          type: object
          description: Represents a subscription to a source and channel
          required:
          - spec
          type: object
          description: Spec for a catalog source.
          required:
          - sourceType
          properties:
            sourceType:
              type: string
              description: The type of the source. Currently the only supported type is "internal".
              enum:
              - internal

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

            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.
