mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 03:48:37 +08:00
[skip e2e]Update chaos test to support cluster n nodes (#13915)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
parent
a32c637776
commit
be8f658385
@ -21,6 +21,7 @@ kubectl config set-context --current --namespace=${ns}
|
||||
pod=${1:-"querynode"}
|
||||
chaos_type=${2:-"pod_kill"} #pod_kill or pod_failure
|
||||
chaos_task=${3:-"chaos-test"} # chaos-test or data-consist-test
|
||||
node_num=${4:-1} # cluster_1_node or cluster_n_nodes
|
||||
|
||||
release="test"-${pod}-${chaos_type/_/-} # replace pod_kill to pod-kill
|
||||
|
||||
@ -40,11 +41,13 @@ then
|
||||
echo "install standalone"
|
||||
helm install --wait --timeout 360s ${release} milvus/milvus --set service.type=NodePort -f ../standalone-values.yaml -n=${ns}
|
||||
fi
|
||||
# if chaos_type is pod_failure, update replicas
|
||||
if [ "$chaos_type" == "pod_failure" ];
|
||||
|
||||
declare -A pod_map=(["querynode"]="queryNode" ["indexnode"]="indexNode" ["datanode"]="dataNode" ["proxy"]="proxy")
|
||||
|
||||
if [ "$node_num" -gt "1" ];
|
||||
then
|
||||
declare -A pod_map=(["querynode"]="queryNode" ["indexnode"]="indexNode" ["datanode"]="dataNode" ["proxy"]="proxy")
|
||||
helm upgrade ${release} milvus/milvus --set ${pod_map[${pod}]}.replicas=2 --reuse-values
|
||||
echo "install cluster n node"
|
||||
helm upgrade ${release} milvus/milvus --set ${pod_map[${pod}]}.replicas=$node_num --reuse-values
|
||||
fi
|
||||
|
||||
# wait all pod ready
|
||||
|
Loading…
Reference in New Issue
Block a user