apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: multiraftclusters.storage.atomix.io
spec:
  group: storage.atomix.io
  names:
    kind: MultiRaftCluster
    listKind: MultiRaftClusterList
    plural: multiraftclusters
    singular: multiraftcluster
  scope: Namespaced
  versions:
  - name: v2beta2
    served: true
    storage: true
    subresources:
      status: {}
    schema:
      openAPIV3Schema:
        type: object
        required:
        - spec
        properties:
          spec:
            type: object
            properties:
              replicas:
                type: integer
                minimum: 1
                default: 1
              groups:
                type: integer
                minimum: 1
                maximum: 1024
                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
              raft:
                type: object
                properties:
                  quorumSize:
                    type: integer
                  readReplicas:
                    type: integer
                  heartbeatPeriod:
                    type: string
                  electionTimeout:
                    type: string
                  snapshotEntryThreshold:
                    type: integer
                    minimum: 0
                  compactionRetainEntries:
                    type: integer
                    minimum: 0
          status:
            type: object
            properties:
              state:
                type: string
                default: NotReady
    additionalPrinterColumns:
    - name: Status
      type: string
      description: The Raft cluster state
      jsonPath: .status.state