Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions test/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,7 @@ set_namespace() {
# Get the resulting IP of the hostname only-in-cluster-test1.test1 from the first test cluster
# get_ip 1 only-in-cluster-test1.test1
get_ip() {
PORT=""
if [ "$1" == "1" ]
then
PORT="1053"
elif [ "$1" == "2" ]
then
PORT="1054"
else
echo "Invalid cluster identifier $1"
return 1
fi

IP=$(dig +short "$2" @localhost -p $PORT +tcp || true)
IP=$(dig "$2" @127.0.0.1${1} +short +tcp || true)

echo -n "$IP"
}
Expand Down
10 changes: 7 additions & 3 deletions test/kind-config-test1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d"
networking:
ipFamily: ipv4
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30001
hostPort: 1053
hostPort: 53
protocol: TCP
listenAddress: 127.0.0.11
- containerPort: 30001
hostPort: 1053
protocol: UDP
hostPort: 53
protocol: UDP
listenAddress: 127.0.0.11
10 changes: 7 additions & 3 deletions test/kind-config-test2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d"
networking:
ipFamily: ipv4
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30001
hostPort: 1054
hostPort: 53
protocol: TCP
listenAddress: 127.0.0.12
- containerPort: 30001
hostPort: 1054
protocol: UDP
hostPort: 53
protocol: UDP
listenAddress: 127.0.0.12
4 changes: 2 additions & 2 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ kubectl get ns
set +e

echo_color "${G}Waiting for cluster 1 relay to start"
until dig mcingress.test1 @localhost -p 1053 +tcp
until dig mcingress.test1 @127.0.0.11 +tcp
do
sleep 1
done

echo_color "${G}Waiting for cluster 2 relay to start"
until dig mcingress.test2 @localhost -p 1054 +tcp
until dig mcingress.test2 @127.0.0.12 +tcp
do
sleep 1
done
Expand Down