apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: sources.bond.ectobit.com
spec:
  group: bond.ectobit.com
  names:
    kind: Source
    singular: source
    plural: sources
    shortNames:
      - src
  scope: Namespaced
  versions:
    - additionalPrinterColumns:
        - name: Ready
          type: string
          jsonPath: .status.ready
      name: v1alpha1
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                secrets:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      destinations:
                        type: array
                        items:
                          type: object
                          properties:
                            namespace:
                              type: string
                            name:
                              type: string
                          required:
                            - namespace
            status:
              nullable: true
              type: object
              properties:
                ready:
                  type: string
                  pattern: ^\d+/\d+$
          required:
            - spec
          title: Source
          type: object
      served: true
      storage: true
      subresources:
        status: {}
