498b235461
Build and test / Build and test AMD64 Ubuntu 22.04 (push) Failing after 0s
Publish Builder / amazonlinux2023 (push) Failing after 1s
Build and test / UT for Go (push) Has been skipped
Publish KRTE Images / KRTE (push) Failing after 1s
Build and test / Integration Test (push) Has been skipped
Build and test / Upload Code Coverage (push) Has been skipped
Publish Builder / rockylinux9 (push) Failing after 1s
Publish Builder / ubuntu22.04 (push) Failing after 0s
Publish Builder / ubuntu24.04 (push) Failing after 0s
Publish Gpu Builder / publish-gpu-builder (push) Failing after 1s
Publish Test Images / PyTest (push) Failing after 0s
Build and test / UT for Cpp (push) Has been cancelled
23 lines
684 B
Bash
23 lines
684 B
Bash
#!/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"
|
|
|
|
# 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
|
|
do
|
|
endpoints+="$pod:2379,"
|
|
done
|
|
|
|
$etcdctl_cmd ${endpoints::-1} |