apiVersion: cloud.pingcap.com/v1
kind: ClusterConfig
metadata:
  creationTimestamp: null
  labels:
    tags.tidbcloud.com/cluster: all
    tidbcloud.com/cluster-version: v5.2.0
    tidbcloud.com/managed-by: cicd
    tidbcloud.com/module: tidb-configuration
    tags.tidbcloud.com/tenant: all
  name: base--v5.2.0
spec:
  selector:
    matchLabels:
      tidbcloud.com/cluster-version: v5.2.0
  backup:
    baseImage: v5.2.0-20210827
    config: |
      concurrency = 32
  configMeta:
    configVersion: 0
    gitCommitID: "123456789"
  pd:
    baseImage: v5.2.0-20210827
    config: |2

      [dashboard]
      enable-telemetry = false
      internal-proxy = true

      [log]
      level = "info"

      [replication]
      location-labels = ["failure-domain.beta.kubernetes.io/region", "failure-domain.beta.kubernetes.io/zone", "kubernetes.io/hostname"]
      max-replicas = 3
  priority: 0
  restore:
    baseImage: v5.2.0-20210827
    config: ""
  lightning:
    baseImage: v5.2.0-20210827
    config: |

      [checkpoint]
      driver = "file"
      dsn = "/etc/endpoint/cp.pb"
      enable = true

      [cron]
      log-progress = "5m"
      switch-mode = "5m"

      [lightning]
      check-requirements = false
      file = ""
      index-concurrency = 4
      level = "info"
      pprof-port = 8289
      table-concurrency = 6

      [mydumper]
      strict-format = false

      [mydumper.csv]
      backslash-escape = true
      delimiter = "\""
      header = true
      not-null = false
      null = "\\N"
      separator = ","

      [post-restore]
      analyze = true
      checksum = true

      [security]
      ca-path = "/var/lib/lightning-tls/ca.crt"
      cert-path = "/var/lib/lightning-tls/tls.crt"
      key-path = "/var/lib/lightning-tls/tls.key"

      [tidb]
      build-stats-concurrency = 4
      distsql-scan-concurrency = 15
      host = "db-tidb"
      index-serial-scan-concurrency = 2
      log-level = "error"
      pd-addr = "db-pd:2379"
      port = 4000
      status-port = 10080
      tls = "false"

      [tikv-importer]
      backend = "local"
      sorted-kv-dir = "/etc/endpoint"
  tidb:
    baseImage: v5.2.0-20210827
    config: |
      enable-telemetry = false
      new_collations_enabled_on_first_bootstrap = true

      [log]
      level = "debug"

      [performance]
      max-procs = 0
      tcp-keep-alive = true
  tiflash:
    baseImage: v5.2.0-20210827
    config: |
      delta_index_cache_size = 3221225472
      mark_cache_size = 2147483648
      max_memory_usage = 32212254720
      max_memory_usage_for_all_queries = 32212254720
      minmax_index_cache_size = 2147483648

      [storage]

      [storage.main]
      dir = ["/data0/db"]
  tikv:
    baseImage: v5.2.0-20210827
    config: |
      log-level = "info"

      [readpool]

      [readpool.coprocessor]
      use-unified-pool = true

      [readpool.storage]
      use-unified-pool = true

      [server]
      max-grpc-send-msg-len = 100000000
  updatePolicy: Immediate
  version: v5.2.0
status: {}
