TiDB Binlog Drainer Configurations in Kubernetes

This document introduces the configuration parameters for a TiDB Binlog drainer in Kubernetes.

Configuration parameters

The following table contains all configuration parameters available for the tidb-drainer chart. Refer to Use Helm to learn how to configure these parameters.

ParameterDescriptionDefault Value
timezoneTimezone configurationUTC
drainerNameThe name of Statefulset“”
clusterNameThe name of the source TiDB clusterdemo
clusterVersionThe version of the source TiDB clusterv3.0.1
baseImageThe base image of TiDB Binlogpingcap/tidb-binlog
imagePullPolicyThe pulling policy of the imageIfNotPresent
logLevelThe log level of the drainer processinfo
storageClassNamestorageClass used by the drainer. storageClassName refers to a type of storage provided by the Kubernetes cluster, which might map to a level of service quality, a backup policy, or to any policy determined by the cluster administrator. Detailed reference: storage-classeslocal-storage
storageThe storage limit of the drainer Pod. Note that you should set a larger size if db-type is set to pb10Gi
disableDetectDetermines whether to disable casualty detectionfalse
initialCommitTsUsed to initialize a checkpoint if the drainer does not have one. The value is a string type, such as “424364429251444742”“-1”
tlsCluster.enabledWhether or not to enable TLS between clustersfalse
configThe configuration file passed to the drainer. Detailed reference: drainer.toml(see below)
resourcesThe resource limits and requests of the drainer Pod{}
nodeSelectorEnsures that the drainer Pod is only scheduled to the node with the specific key-value pair as the label. Detailed reference: nodeselector{}
tolerationsApplies to drainer Pods, allowing the Pods to be scheduled to the nodes with specified taints. Detailed reference: taint-and-toleration{}
affinityDefines scheduling policies and preferences of the drainer Pod. Detailed reference: affinity-and-anti-affinity{}

The default value of config is:

  1. detect-interval = 10
  2. compressor = ""
  3. [syncer]
  4. worker-count = 16
  5. disable-dispatch = false
  6. ignore-schemas = "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql"
  7. safe-mode = false
  8. txn-batch = 20
  9. db-type = "file"
  10. [syncer.to]
  11. dir = "/data/pb"