apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: charlesdeployments.charlescd.io
spec:
  group: charlescd.io
  versions:
    - name: v1
      served: true
      storage: true
      subresources:
        status: { }
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                circleId:
                  type: string
                deploymentId:
                  type: string
                components:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      tag:
                        type: string
                      chart:
                        type: string
                    required:
                      - name
                      - tag
                      - chart
              required:
                - components
                - circleId
                - deploymentId

  names:
    kind: CharlesDeployment
    plural: charlesdeployments
    singular: charlesdeployment
  scope: Cluster