mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
[skip e2e]Add script to get ectd status (#22638)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
parent
e1f1b6e2ae
commit
e0352db982
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e # Exit immediately if a command exits with a non-zero status.
|
||||
instance_name=$1
|
||||
# Define the etcdctl command with endpoints option
|
||||
etcdctl_cmd="etcdctl endpoint status -w table --endpoints"
|
||||
@ -6,6 +7,12 @@ etcdctl_cmd="etcdctl endpoint status -w table --endpoints"
|
||||
# Get the ip of all the etcd pods with the specified labels
|
||||
etcd_pods=$(kubectl get pods -l app.kubernetes.io/name=etcd,app.kubernetes.io/instance=${instance_name} -o jsonpath='{.items[*].status.podIP}')
|
||||
|
||||
# Check if the etcd pods are running
|
||||
if [ -z "$etcd_pods" ]; then
|
||||
echo "No etcd pods found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Loop through the list of etcd pods and get their status
|
||||
endpoints=""
|
||||
for pod in $etcd_pods
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user