apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: agents.sidecar.atomix.io
spec:
  group: sidecar.atomix.io
  scope: Namespaced
  names:
    kind: Agent
    listKind: AgentList
    plural: agents
    singular: agent
  versions:
  - name: v2beta1
    served: true
    storage: true
    subresources:
      status: {}
    schema:
      openAPIV3Schema:
        type: object
        required:
        - spec
        properties:
          spec:
            type: object
            required:
            - port
            - pod
            - store
            properties:
              port:
                type: integer
              pod:
                type: object
                x-kubernetes-preserve-unknown-fields: true
              store:
                type: object
                x-kubernetes-preserve-unknown-fields: true
          status:
            type: object
            properties:
              ready:
                type: boolean
              revision:
                type: integer
    additionalPrinterColumns:
    - name: Pod
      type: string
      description: The pod
      jsonPath: .spec.pod.name
    - name: Store
      type: string
      description: The store
      jsonPath: .spec.store.name
    - name: Ready
      type: boolean
      description: The agent status
      jsonPath: .status.ready