apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: multiraftprotocols.storage.atomix.io
spec:
  group: storage.atomix.io
  names:
    kind: MultiRaftProtocol
    listKind: MultiRaftProtocolList
    plural: multiraftprotocols
    singular: multiraftprotocol
    shortNames:
    - multirafts
    - multiraft
    - rafts
    - raft
  scope: Namespaced
  versions:
  - name: v2beta1
    served: true
    storage: true
    subresources:
      status: {}
    schema:
      openAPIV3Schema:
        type: object
        required:
        - spec
        properties:
          spec:
            type: object
            properties:
              clusters:
                type: integer
                minimum: 1
                maximum: 1024
                default: 1
              partitions:
                type: integer
                minimum: 1
                maximum: 1024
                default: 1
              replicas:
                type: integer
                minimum: 1
                maximum: 9
                default: 1
              image:
                type: string
              imagePullPolicy:
                type: string
              imagePullSecrets:
                type: array
                items:
                  type: object
                  required:
                  - name
                  properties:
                    name:
                      type: string
              securityContext:
                type: object
                x-kubernetes-preserve-unknown-fields: true
              volumeClaimTemplate:
                x-kubernetes-preserve-unknown-fields: true
                type: object
          status:
            type: object
            properties:
              revision:
                type: integer
              replicas:
                type: array
                items:
                  type: object
                  required:
                  - id
                  - host
                  - port
                  properties:
                    id:
                      type: string
                    nodeId:
                      type: string
                    host:
                      type: string
                    port:
                      type: integer
                    extraPorts:
                      type: object
                      additionalProperties:
                        type: integer
                    ready:
                      type: boolean
              partitions:
                type: array
                items:
                  type: object
                  required:
                  - id
                  - replicas
                  properties:
                    id:
                      type: integer
                      minimum: 1
                    replicas:
                      type: array
                      items:
                        type: string
                    ready:
                      type: boolean