apiVersion: api/v1
kind: Plan
name: endless-htap-dtworkload-perf-daily
#type: ONE_SHOT
schedule: "@daily"
tags: [  ]

testbed:
  generateName: endless-htap-dt-perf-
  reclaimPolicy:
    gcStrategy:
      onFailure:
        artifact:
          monitor: true
          log: true
        reserveEnv:
          durationOnWorkingHour: '{{meta.parameters.onFailureNoReserve}}'
        notification:
          feishu: https://open.feishu.cn/open-apis/bot/v2/hook/573d5985-7c9e-4a4d-8e9f-a0e0b4bda9e2
      onSuccess:
        notification:
          feishu: https://open.feishu.cn/open-apis/bot/v2/hook/ea22c6ca-afc8-4b8b-a196-025e5b96fccf
        artifact:
          monitor: true
          log: true
  resourcePool: benchbot
  items:
    -   name: tiflash
        type: WORKLOAD_NODE
        spec:
          container:
            name: tiflash
            image: hub.pingcap.net/qa/tiflash:master
            command:
              - tail
              - "-f"
              - "/dev/null"
            storageClassName: fast-disks # 挂载到独占的 NVME 盘
            resources:
              requests:
                memory: 16Gi
                cpu: "20"
                storage: 1500Gi
            nodeSelector: # NOTE: 可选择运行节点, 等效于 k8s 的 nodeSelector
              kubernetes.io/hostname: 172.16.6.45
            volumeMount: # 额外挂载一个 nvme 盘到这个路劲下
              mountPath: /root
steps:
  - name: do-performance-test
    caseName: tiflash_dt_performance_test
    arguments:
      - name: tiflash
        value: "{{testbed.tiflash}}"
  - name: random-test
    caseName: tiflash_dt_random_test
    arguments:
      - name: tiflash
        value: "{{testbed.tiflash}}"
failFast: false