mirror of https://github.com/milvus-io/milvus.git
[skip e2e]Set image repo and tag as input parameters (#17496)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>pull/17501/head
parent
57f2429b68
commit
2b298e4230
|
@ -2,6 +2,15 @@ name: Cluster N node Chaos Test
|
|||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
image_tag:
|
||||
description: The image tag to use for the chaos test
|
||||
required: true
|
||||
default: 'master-latest'
|
||||
image_repo:
|
||||
description: The image repo to use for the chaos test
|
||||
required: true
|
||||
default: 'milvusdb/milvus-dev'
|
||||
schedule:
|
||||
- cron: "30 19 * * *"
|
||||
jobs:
|
||||
|
@ -22,7 +31,8 @@ jobs:
|
|||
chaos_type=${{ matrix.chaos_type }}
|
||||
release="test"-${{ matrix.pod }}-${chaos_type/_/-}
|
||||
echo "RELEASE=$release" >> $GITHUB_ENV
|
||||
|
||||
echo "IMAGE_REPO=${{ github.event.inputs.image_repo || env.DEFAULT_IMAGE_REPO}}" >> $GITHUB_ENV
|
||||
echo "IMAGE_TAG=${{ github.event.inputs.image_tag || env.DEFAULT_IMAGE_TAG}}" >> $GITHUB_ENV
|
||||
- name: Creating kind cluster
|
||||
uses: helm/kind-action@v1.2.0
|
||||
|
||||
|
@ -71,7 +81,7 @@ jobs:
|
|||
declare -A pod_map=( ["querynode"]="queryNode" ["indexnode"]="indexNode" ["datanode"]="dataNode" ["proxy"]="proxy")
|
||||
helm repo add milvus https://milvus-io.github.io/milvus-helm
|
||||
helm repo update
|
||||
helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set ${pod_map[${{ matrix.pod }}]}.replicas=2 -f cluster-values.yaml -n=chaos-testing
|
||||
helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set image.all.repository=${{ env.IMAGE_REPO }} --set image.all.tag=${{ env.IMAGE_TAG }} --set ${pod_map[${{ matrix.pod }}]}.replicas=2 -f cluster-values.yaml -n=chaos-testing
|
||||
kubectl get pods -n chaos-testing
|
||||
sleep 20s
|
||||
kubectl get pods -n chaos-testing
|
||||
|
|
|
@ -7,6 +7,10 @@ on:
|
|||
description: The image tag to use for the chaos test
|
||||
required: true
|
||||
default: 'master-latest'
|
||||
image_repo:
|
||||
description: The image repo to use for the chaos test
|
||||
required: true
|
||||
default: 'milvusdb/milvus-dev'
|
||||
schedule:
|
||||
- cron: "30 17 * * *"
|
||||
jobs:
|
||||
|
@ -27,6 +31,7 @@ jobs:
|
|||
DEFAULT_IMAGE_TAG: master-latest
|
||||
run: |
|
||||
echo "RELEASE=test-${{ matrix.pod }}-pod-kill" >> $GITHUB_ENV
|
||||
echo "IMAGE_REPO=${{ github.event.inputs.image_repo || env.DEFAULT_IMAGE_REPO}}" >> $GITHUB_ENV
|
||||
echo "IMAGE_TAG=${{ github.event.inputs.image_tag || env.DEFAULT_IMAGE_TAG}}" >> $GITHUB_ENV
|
||||
|
||||
- name: Creating kind cluster
|
||||
|
@ -77,8 +82,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
|
||||
if [[ ${{ matrix.pod }} != *"standalone"* ]]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set pulsar.enabled=false --set kafka.enabled=true --set image.all.tag=${{ env.IMAGE_TAG }} -f cluster-values.yaml -n=chaos-testing; fi
|
||||
if [[ ${{ matrix.pod }} == *"standalone"* ]]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set image.all.tag=${{ env.IMAGE_TAG }} -f standalone-values.yaml -n=chaos-testing; fi
|
||||
if [[ ${{ matrix.pod }} != *"standalone"* ]]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set pulsar.enabled=false --set kafka.enabled=true --set image.all.repository=${{ env.IMAGE_REPO }} --set image.all.tag=${{ env.IMAGE_TAG }} -f cluster-values.yaml -n=chaos-testing; fi
|
||||
if [[ ${{ matrix.pod }} == *"standalone"* ]]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set image.all.repository=${{ env.IMAGE_REPO }} --set image.all.tag=${{ env.IMAGE_TAG }} -f standalone-values.yaml -n=chaos-testing; fi
|
||||
kubectl get pods -n chaos-testing
|
||||
sleep 20s
|
||||
kubectl get pods -n chaos-testing
|
||||
|
@ -165,8 +170,8 @@ jobs:
|
|||
run: |
|
||||
kubectl config set-context --current --namespace=chaos-testing
|
||||
bash scripts/uninstall_milvus.sh ${{ env.RELEASE }}
|
||||
if [ ${{ matrix.pod }} != "standalone" ]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus -f cluster-values.yaml -n=chaos-testing; fi
|
||||
if [ ${{ matrix.pod }} == "standalone" ]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set cluster.enabled=false --set etcd.replicaCount=1 --set minio.mode=standalone --set pulsar.enabled=false -n=chaos-testing; fi
|
||||
if [ ${{ matrix.pod }} != "standalone" ]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set image.all.repository=${{ env.IMAGE_REPO }} --set image.all.tag=${{ env.IMAGE_TAG }} -f cluster-values.yaml -n=chaos-testing; fi
|
||||
if [ ${{ matrix.pod }} == "standalone" ]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set image.all.repository=${{ env.IMAGE_REPO }} --set image.all.tag=${{ env.IMAGE_TAG }} --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
|
||||
|
|
|
@ -170,8 +170,8 @@ jobs:
|
|||
run: |
|
||||
kubectl config set-context --current --namespace=chaos-testing
|
||||
bash scripts/uninstall_milvus.sh ${{ env.RELEASE }}
|
||||
if [ ${{ matrix.pod }} != "standalone" ]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus -f cluster-values.yaml -n=chaos-testing; fi
|
||||
if [ ${{ matrix.pod }} == "standalone" ]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set cluster.enabled=false --set etcd.replicaCount=1 --set minio.mode=standalone --set pulsar.enabled=false -n=chaos-testing; fi
|
||||
if [ ${{ matrix.pod }} != "standalone" ]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set image.all.repository=${{ env.IMAGE_REPO }} --set image.all.tag=${{ env.IMAGE_TAG }} -f cluster-values.yaml -n=chaos-testing; fi
|
||||
if [ ${{ matrix.pod }} == "standalone" ]; then helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set image.all.repository=${{ env.IMAGE_REPO }} --set image.all.tag=${{ env.IMAGE_TAG }} --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
|
||||
|
|
Loading…
Reference in New Issue