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
  scope: Namespaced
  versions:
  - name: v2beta2
    served: true
    storage: true
    subresources:
      status: {}
    schema:
      openAPIV3Schema:
        type: object
        required:
        - spec
        properties:
          spec:
            type: object
            required:
            - cluster
            properties:
              cluster:
                type: object
                properties:
                  replicas:
                    type: integer
                    minimum: 1
                    default: 1
                  groups:
                    type: integer
                    minimum: 1
                    maximum: 1024
                    default: 1
                  template:
                    type: object
                    required:
                    - spec
                    properties:
                      spec:
                        type: object
                        properties:
                          members:
                            type: integer
                            minimum: 1
                          readOnlyMembers:
                            type: integer
                          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
                          raftConfig:
                            type: object
                            properties:
                              heartbeatPeriod:
                                type: string
                              electionTimeout:
                                type: string
                              sessionTimeout:
                                type: string
                              snapshotStrategy:
                                type: object
                                properties:
                                  type:
                                    type: string
                                  entryThreshold:
                                    type: integer
                              compactionStrategy:
                                type: object
                                properties:
                                  type:
                                    type: string
                                  retainEntries:
                                    type: integer
          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
                    host:
                      type: string
                    port:
                      type: integer
                    replicas:
                      type: array
                      items:
                        type: string
                    readReplicas:
                      type: array
                      items:
                        type: string
                    ready:
                      type: boolean