apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: subscriptions.operators.coreos.com
  annotations:
    displayName: Subscription
    description: Subcribes service catalog to a source and channel to recieve updates for packages.
spec:
  group: operators.coreos.com
  version: v1alpha1
  versions:
  - name: v1alpha1
    served: true
    storage: true
  scope: Namespaced
  names:
    plural: subscriptions
    singular: subscription
    kind: Subscription
    listKind: SubscriptionList
    categories:
    - all
    - olm
  additionalPrinterColumns:
  - name: Package
    type: string
    description: The package subscribed to
    JSONPath: .spec.name
  - name: Source
    type: string
    description: The catalog source for the specified package
    JSONPath: .spec.source
  - name: Channel
    type: string
    description: The channel of updates to subscribe to
    JSONPath: .spec.channel
  subresources:
    # status enables the status subresource.
    status: {}
  validation:
    openAPIV3Schema:
      properties:
        spec:
          type: object
          description: Spec for a Subscription
          required:
          - source
          - name
          properties:
            source:
              type: string
              description: Name of a CatalogSource that defines where and how to find the channel
            sourceNamespace:
              type: string
              description: The Kubernetes namespace where the CatalogSource used is located
            name:
              type: string
              description: Name of the package that defines the application
            channel:
              type: string
              description: Name of the channel to track
            startingCSV:
              type: string
              description: Name of the AppType that this subscription tracks
            installPlanApproval:
              type: string
              description: Approval mode for emitted InstallPlans
              enum:
              - Manual
              - Automatic
