Files
kubevela/hack/load-test/cleanup.sh
Somefive b4ef7e915f Feat: add load testing app template (#5526)
* Feat: add load testing apptemplate

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: update region template

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: use configmap instead of secret and add cleanup script

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* enhance readme

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-16 18:57:04 +08:00

19 lines
312 B
Bash

#!/bin/bash
SHARD=${SHARD:-3}
BEGIN=${BEGIN:-0}
SIZE=${SIZE:-1000}
WORKER=${WORKER:-8}
run() {
for i in $(seq $(expr $1 + $BEGIN) $WORKER $(expr $BEGIN + $SIZE - 1)); do
kubectl delete app app-$i -n load-test-$(expr $i % $SHARD) --wait=false
done
}
for j in $(seq 0 $WORKER); do
run $j &
done
wait