##---
# Source: olm/templates/06-installplan.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: installplan-v1s.app.coreos.com
  annotations:
    displayName: Install Plan
    description: Represents a plan to install and resolve dependencies for Cluster Services
  labels:
    tectonic-operators.coreos.com/managed-by: tectonic-x-operator
spec:
  group: app.coreos.com
  version: v1alpha1
  scope: Namespaced
  names:
    plural: installplan-v1s
    singular: installplan-v1
    kind: InstallPlan-v1
    listKind: InstallPlanList-v1
  validation:
    openAPIV3Schema:
      type: object
      description: Document which defines the desire and current state of an installation of a Cluster Service
      required:
      - spec
      properties:
        spec:
          type: object
          description: Spec for an InstallPlan
          required:
          - clusterServiceVersionNames
          - approval
          properties:
            clusterServiceVersionNames:
              type: array
              description: A list of the names of the Cluster Services
              items:
                type: string
            approval:
              type: string
              enum:
              - Automatic
              - Manual
              - Update-Only # Will only apply an update if it updates existing packages only and doesn't add any new ones
            approved:
              type: boolean
      anyOf:
        - properties:
          approval: 
            enum: 
              - Manual
          required:
            - approved
        - properties:
          approval:
            enum:
              - Automatic
              - Update-Only
          required: []
