Skip to content

Commit 1fcec5f

Browse files
committed
tc
1 parent bc516ff commit 1fcec5f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/cni/check_affinity.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ fi
1818
ITERATIONS=${ITERATIONS:-1}
1919
LB_IP=${1:-$(minikube kubectl -- get service my-loadbalancer-service -o jsonpath='{.status.loadBalancer.ingress[0].ip}')}
2020

21+
22+
dump_status(){
23+
minikube kubectl -- get pods -A -o wide
24+
minikube kubectl -- get service my-loadbalancer-service -o wide
25+
}
26+
2127
#$1: URL
2228
#$2: SRC_IP
2329
get_pod(){
@@ -48,13 +54,15 @@ check_affinity(){
4854
echo "Waiting for ${LB_IP}:80 to return a valid HTTP response..."
4955
while [[ "$(get_pod ${LB_IP}:80 | grep my-nginx-deployment)" == "" ]]; do
5056
sleep 1
57+
dump_status
5158
done
5259
sudo ip netns exec client curl -s ${LB_IP}:80
5360

5461
#Make sure service at 8080 is also reachable (no misconfigs)
5562
echo "Waiting for ${LB_IP}:8080 to return a valid HTTP response..."
5663
while [[ "$(get_pod ${LB_IP}:8080 | grep my-nginx-deployment)" == "" ]]; do
5764
sleep 1
65+
dump_status
5866
done
5967
sudo ip netns exec client curl -s ${LB_IP}:8080
6068

0 commit comments

Comments
 (0)