---
generateName: testbed-
items:
- name: tc-upstream # 资源对象项名称
  type: TIDB_CLUSTER # 资源对象类型
  spec:
    version: "v5.2.1" # 全局 version 字段，结合 baseImage 使用
    pd:
      replicas: 1
      # baseImage: hub.pingcap.net/qa/pd # baseImage 设置后 image 字段失效，此时 image = <baseImage>:<version>，用到升级时必须设置 baseImage
      baseImage: registry-mirror.pingcap.net/pingcap/pd
      # version: "v5.0.2" # 局部覆盖 spec.version 字段

      # more refer to: https://github.com/tikv/pd/blob/master/conf/config.toml
      # config is string type and toml format, I prefer uses https://www.convertsimple.com/convert-yaml-to-toml/ to transfer yaml to toml
      config: |
        [log]
        level = "info"
    tidb:
      replicas: 1
      baseImage: registry-mirror.pingcap.net/pingcap/tidb
      config: |
        [log]
        # Log level: debug, info, warn, error, fatal.
        level = "info"
    tikv:
      replicas: 1
      baseImage: registry-mirror.pingcap.net/pingcap/tikv
      # more refer to: https://github.com/tikv/tikv/blob/master/etc/config-template.toml
      config: |
        ## Log levels: trace, debug, info, warning, error, critical.
        ## Note that `debug` and `trace` are only available in development builds.
        log-level = "info"
        [storage]
        reserve-space = "0MB"
    pump:
      baseImage: registry-mirror.pingcap.net/pingcap/tidb-binlog
      replicas: 1
      requests:
        storage: 30Gi
      config: |
        addr = "0.0.0.0:8250"
        gc = 7
        heartbeat-interval = 2
-  name: tc-downstream # 资源对象项名称
   type: TIDB_CLUSTER # 资源对象类型
   spec:
       version: "v5.2.1" # 全局 version 字段，结合 baseImage 使用
       pd:
           replicas: 1
           # baseImage: hub.pingcap.net/qa/pd # baseImage 设置后 image 字段失效，此时 image = <baseImage>:<version>，用到升级时必须设置 baseImage
           baseImage: registry-mirror.pingcap.net/pingcap/pd
           # version: "v5.0.2" # 局部覆盖 spec.version 字段

           # more refer to: https://github.com/tikv/pd/blob/master/conf/config.toml
           # config is string type and toml format, I prefer uses https://www.convertsimple.com/convert-yaml-to-toml/ to transfer yaml to toml
           config: |
               [log]
               level = "info"
       tidb:
           replicas: 1
           baseImage: registry-mirror.pingcap.net/pingcap/tidb
           config: |
               [log]
               # Log level: debug, info, warn, error, fatal.
               level = "info"
       tikv:
           replicas: 1
           baseImage: registry-mirror.pingcap.net/pingcap/tikv
           # more refer to: https://github.com/tikv/tikv/blob/master/etc/config-template.toml
           config: |
               ## Log levels: trace, debug, info, warning, error, critical.
               ## Note that `debug` and `trace` are only available in development builds.
               log-level = "info"
               [storage]
               reserve-space = "0MB"
- name: upstream-drainer
  type: TIDB_DRAINER
  spec:
    clusterName: tc-upstream
    clusterVersion: v5.2.1
    baseImage: registry-mirror.pingcap.net/pingcap/tidb-binlog
    # storageClassName: local-path
    storage: 10Gi
    initialCommitTs: "-1"
    resources:
      requests:
        cpu: "2000m"
        memory: "4Gi"
    config: |
      detect-interval = 10
      [syncer]
      worker-count = 16
      txn-batch = 20
      disable-dispatch = false
      ignore-schemas = "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql"
      safe-mode = false
      db-type = "tidb"
      [syncer.to]
      host = "tc-downstream-tidb"
      user = "root"
      password = ""
      port = 4000
