apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: primitives.atomix.io
spec:
  group: atomix.io
  scope: Namespaced
  names:
    kind: Primitive
    listKind: PrimitiveList
    plural: primitives
    singular: primitive
  versions:
  - name: v2beta1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        required:
        - spec
        properties:
          spec:
            description: |-
              The primitive specification describes how a primitive is stored and accessed.
            type: object
            required:
            - type
            - store
            properties:
              type:
                description: |-
                  The primitive type name.
                type: string
              store:
                description: |-
                  A reference to the Store used to manage the primitive state. This must include the UID of a valid
                  store.
                type: object
                x-kubernetes-preserve-unknown-fields: true
                properties:
                  config:
                    type: object
                    additionalProperties:
                      type: object
                      x-kubernetes-preserve-unknown-fields: true
    additionalPrinterColumns:
    - name: Type
      type: string
      description: The primitive type
      jsonPath: .spec.type
    - name: Store
      type: string
      description: The primitive store
      jsonPath: .spec.store.name