[skip ci]Add standalone pod kill chaos (#11191)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
pull/11192/head
zhuwenxing 2021-11-03 20:32:09 +08:00 committed by GitHub
parent 7fc639b456
commit 93d0616457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 3 deletions

View File

@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pod: [datacoord, datanode, indexcoord, indexnode, proxy, pulsar, querycoord, querynode, rootcoord, etcd, minio]
pod: [standalone, datacoord, datanode, indexcoord, indexnode, proxy, pulsar, querycoord, querynode, rootcoord, etcd, minio]
steps:
@ -65,7 +65,8 @@ jobs:
bash ../../../scripts/docker_image_find_tag.sh -n milvusdb/milvus-dev -t master-latest -f master- -F -L -q
helm repo add milvus https://milvus-io.github.io/milvus-helm
helm repo update
helm install --wait --timeout 360s milvus-chaos milvus/milvus -f cluster-values.yaml -n=chaos-testing
if [ ${{ matrix.pod }} != "standalone" ]; then helm install --wait --timeout 360s milvus-chaos milvus/milvus -f cluster-values.yaml -n=chaos-testing; fi
if [ ${{ matrix.pod }} == "standalone" ]; then helm install --wait --timeout 360s milvus-chaos milvus/milvus --set cluster.enabled=false --set etcd.replicaCount=1 --set minio.mode=standalone --set pulsar.enabled=false -n=chaos-testing; fi
kubectl get pods -n chaos-testing
sleep 20s
kubectl get pods -n chaos-testing
@ -109,7 +110,8 @@ jobs:
run: |
kubectl config set-context --current --namespace=chaos-testing
bash scripts/uninstall_milvus.sh
helm install --wait --timeout 360s milvus-chaos milvus/milvus -f cluster-values.yaml -n=chaos-testing
if [ ${{ matrix.pod }} != "standalone" ]; then helm install --wait --timeout 360s milvus-chaos milvus/milvus -f cluster-values.yaml -n=chaos-testing; fi
if [ ${{ matrix.pod }} == "standalone" ]; then helm install --wait --timeout 360s milvus-chaos milvus/milvus --set cluster.enabled=false --set etcd.replicaCount=1 --set minio.mode=standalone --set pulsar.enabled=false -n=chaos-testing; fi
kubectl get pods -n chaos-testing
sleep 20s
kubectl get pods -n chaos-testing

View File

@ -0,0 +1,22 @@
kind: Schedule
apiVersion: chaos-mesh.org/v1alpha1
metadata:
name: test-rootcoord-pod-kill
namespace: chaos-testing
spec:
schedule: '*/5 * * * * *'
startingDeadlineSeconds: 60
concurrencyPolicy: Forbid
historyLimit: 1
type: PodChaos
podChaos:
selector:
namespaces:
- chaos-testing
labelSelectors:
app.kubernetes.io/instance: milvus-chaos
app.kubernetes.io/name: milvus
component: standalone
mode: one
action: pod-kill
gracePeriod: 0

View File

@ -125,6 +125,18 @@ Collections:
testcase:
name: test_pulsar_pod_kill
chaos: chaos_pulsar_pod_kill.yaml
expectation:
cluster_1_node:
create: fail
insert: fail
flush: fail
index: fail
search: fail
query: fail
-
testcase:
name: test_standalone_pod_kill
chaos: chaos_standalone_pod_kill.yaml
expectation:
cluster_1_node:
create: fail