polardbx.aliyun.com/v1 XStore

Using XStore allows for the free definition of the topology and configuration information for the PolarDB-X Standard Edition.

The following are the configurable items and the meanings of the related fields:

apiVersion: polardbx.aliyun.com/v1
kind: XStore
metadata:
  name: full
  namespace: default
spec:
  #
  # XStore related configuration items
  #
  config:
    # Operator related configuration items
    controller:
      # XStore RPC protocol version
      # Required, value range [1, 2]
      # Default value: 1
      RPCProtocolVersion: 1
      # Log purge interval
      # Default value: 0s, indicating no log purge
      logPurgeInterval: 0s
    # **Optional**
    # XStore engine related configuration items
    #
    engine:
      # **Optional**
      # Related configuration items in mycnf
      #
      override:
        value: |+
          loose_new_rpc = off
  # **Optional**
  # Xstore engine type
  # Default value: galaxy
  engine: galaxy
  # **Optional**
  # Name of the parameter template for XStore
  # Corresponds to the name of the PolarDBXParameterTemplate object
  parameterTemplate: {}
  # **Optional**
  # Name of the read-only instance of XStore, default is empty
  # If the current XStore is a read-only instance, this field needs to be filled in
  primaryXStore: classic-8c9z-dn-0
  # **Optional**
  # Whether XStore is a read-only instance
  # false: primary instance, true: read-only instance
  # Default value: false
  readonly: false
  # **Optional**
  #
  # The service type exposed within Kubernetes for the PolarDB-X cluster, defaults to ClusterIP
  # Available values can be referenced from Service types
  #
  # Note: LoadBalancer can be used in cloud-based Kubernetes clusters to bind with LB
  serviceType: ClusterIP
  # PolarDB-X Standard Edition cluster topology
  topology:
    # PolarDB-X Standard Edition node information configuration, supporting Candidate, Voter, Learner
    # The leader node is selected from the Candidate role nodes
    # Voter represents the log node
    # Learner represents the read-only node
    nodeSets:
      # **Required**
      # Configuration of the Candidate node
      - name: cand
        # **Required**
        # Number of Candidate nodes,
        # default value is 2, indicating 1 Leader and 1 Follower
        # If filled with 5, it indicates 1 Leader and 4 Followers
        replicas: 2
        # **Required**
        # Role of the node set, supporting Candidate, Voter, Learner
        # Detailed node configuration as shown above
        role: Candidate
        # **Required**
        # Configuration of the Candidate node set
        template:
          # **Optional**
          # Metadata of the Candidate node set
          metadata:
            annotations:
              cpuset-scheduler: "true"
            labels:
              polardbx/dn-index: "0"
              polardbx/name: classic
              polardbx/rand: 8c9z
              polardbx/role: dn
          # Spec of the Candidate node set
          spec:
            # Affinity information
            affinity:
              nodeAffinity: {}
              podAntiAffinity:
                preferredDuringSchedulingIgnoredDuringExecution:
                  - podAffinityTerm:
                      labelSelector:
                        matchLabels:
                          polardbx/name: classic
                      namespaces:
                        - default
                      topologyKey: kubernetes.io/hostname
                    weight: 100
            # Whether the XStore Candidate Pod uses the host network, default is false
            hostNetwork: false
            # Image name of the XStore Candidate Pod
            image: polardbx/polardbx-engine:v2.4.0_8.4.19
            # Resource information for the XStore Candidate Pod
            resources:
              limits:
                cpu: "2"
                memory: 4Gi
      # **Required**
      # Configuration of the Voter (Logger) node
      - name: log
        # **Required**
        # Number of Voter nodes
        # In the three-replica mode, the value is 1, indicating 1 Leader, 1 Follower, 1 Logger
        # In the two-site and three-center five-replica mode, the value is 0, indicating no Logger node
        replicas: 1
        # **Required**
        # Role of the node set, supporting Candidate, Voter, Learner
        # Detailed node configuration as shown above
        role: Voter
        template:
          # **Optional**
          # Metadata of the Voter node set
          metadata:
            annotations:
              cpuset-scheduler: "true"
            labels:
              polardbx/dn-index: "0"
              polardbx/name: classic
              polardbx/rand: 8c9z
              polardbx/role: dn
          # Spec of the Voter node set
          spec:
            affinity:
              nodeAffinity: {}
              podAntiAffinity:
                preferredDuringSchedulingIgnoredDuringExecution:
                  - podAffinityTerm:
                      labelSelector:
                        matchLabels:
                          polardbx/name: classic
                      namespaces:
                        - default
                      topologyKey: kubernetes.io/hostname
                    weight: 100
            # Whether the XStore Voter Pod uses the host network, default is false
            hostNetwork: false
            # Image name of the XStore Voter Pod
            image: polardbx/polardbx-engine:v2.4.0_8.4.19
            # Resource information for the XStore Voter Pod
            # Since the Voter only stores logs and does not store data, it consumes relatively less resources and can use lower specifications
            resources:
              limits:
                cpu: "2"
                memory: 4Gi
    template:
      metadata: {}
      spec:
        hostNetwork: false
  # **Optional**
  # Upgrade strategy for XStore pods, same as Kubenetes' upgradeStrategy
  # Default value: BestEffort
  upgradeStrategy: BestEffort

results matching ""

    No results matching ""