Skip to content

Commit 05ea4a8

Browse files
E2E: rename network 'kindexgw' to 'xgw'
Network maybe utilized without KinD as the infra provider. Picked xgw as name because if its lexographically "less" than "kind" then default route will point to the wrong network. Signed-off-by: Martin Kennelly <[email protected]>
1 parent 1b76d91 commit 05ea4a8

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,8 @@ jobs:
551551
echo "GOPATH=$GOPATH" >> $GITHUB_ENV
552552
echo "$GOPATH/bin" >> $GITHUB_PATH
553553
if [ $OVN_SECOND_BRIDGE == "true" ]; then
554-
echo OVN_TEST_EX_GW_NETWORK=kindexgw >> $GITHUB_ENV
554+
# must be "greater" lexigraphically than network "kind", therefore external gateway is named xgw
555+
echo OVN_TEST_EX_GW_NETWORK=xgw >> $GITHUB_ENV
555556
echo OVN_ENABLE_EX_GW_NETWORK_BRIDGE=true >> $GITHUB_ENV
556557
fi
557558
if [[ "$JOB_NAME" == *"shard-conformance"* ]] && [ "$ADVERTISE_DEFAULT_NETWORK" == "true" ]; then

contrib/kind-common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ install_ipamclaim_crd() {
450450

451451
docker_create_second_disconnected_interface() {
452452
echo "adding second interfaces to nodes"
453-
local bridge_name="${1:-kindexgw}"
453+
local bridge_name="${1:-xgw}"
454454
echo "bridge: $bridge_name"
455455

456456
if [ "${OCI_BIN}" = "podman" ]; then

contrib/kind.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,11 +1096,11 @@ docker_create_second_interface() {
10961096
echo "adding second interfaces to nodes"
10971097

10981098
# Create the network as dual stack, regardless of the type of the deployment. Ignore if already exists.
1099-
"$OCI_BIN" network create --ipv6 --driver=bridge kindexgw --subnet=172.19.0.0/16 --subnet=fc00:f853:ccd:e798::/64 || true
1099+
"$OCI_BIN" network create --ipv6 --driver=bridge xgw --subnet=172.19.0.0/16 --subnet=fc00:f853:ccd:e798::/64 || true
11001100

11011101
KIND_NODES=$(kind get nodes --name "${KIND_CLUSTER_NAME}")
11021102
for n in $KIND_NODES; do
1103-
"$OCI_BIN" network connect kindexgw "$n"
1103+
"$OCI_BIN" network connect xgw "$n"
11041104
done
11051105
}
11061106

test/e2e/e2e.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,10 +1677,10 @@ var _ = ginkgo.Describe("e2e ingress traffic validation", func() {
16771677
externalContainer, err = providerCtx.CreateExternalContainer(externalContainer)
16781678
framework.ExpectNoError(err, "external container %s must be created successfully", externalContainer.Name)
16791679

1680-
// If `kindexgw` exists, connect client container to it
1681-
kindExgwNetwork, err := infraprovider.Get().GetNetwork("kindexgw")
1680+
// If `xgw` exists, connect client container to it
1681+
exGwNetwork, err := infraprovider.Get().GetNetwork("xgw")
16821682
if err == nil {
1683-
_, _ = providerCtx.AttachNetwork(kindExgwNetwork, externalContainer.Name)
1683+
_, _ = providerCtx.AttachNetwork(exGwNetwork, externalContainer.Name)
16841684
}
16851685
ginkgo.By("Adding ip addresses to each node")
16861686
// add new secondary IP from node subnet to all nodes, if the cluster is v6 add an ipv6 address

test/e2e/service.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,8 @@ var _ = ginkgo.Describe("Services", func() {
815815
externalContainer, err = providerCtx.CreateExternalContainer(externalContainer)
816816
framework.ExpectNoError(err, "external container %s must be created", externalContainer.Name)
817817

818-
// If `kindexgw` exists, connect client container to it
819-
exGwNetwork, err := infraprovider.Get().GetNetwork("kindexgw")
818+
// If `xgw` exists, connect client container to it
819+
exGwNetwork, err := infraprovider.Get().GetNetwork("xgw")
820820
if err == nil {
821821
_, _ = providerCtx.AttachNetwork(exGwNetwork, externalContainer.Name)
822822
}
@@ -1074,10 +1074,10 @@ spec:
10741074
// FIXME: implement feature to connect networks
10751075
// FIXME: tests shouldnt depend on external resources precreated and instead manage those resources within
10761076
// the lifecycle of the test.
1077-
// If `kindexgw` exists, connect client container to it
1078-
kindExGWNetwork, err := infraprovider.Get().GetNetwork("kindexgw")
1077+
// If `xgw` exists, connect client container to it
1078+
exGWNetwork, err := infraprovider.Get().GetNetwork("xgw")
10791079
if err == nil {
1080-
_, _ = providerCtx.AttachNetwork(kindExGWNetwork, serverExternalContainer.GetName())
1080+
_, _ = providerCtx.AttachNetwork(exGWNetwork, serverExternalContainer.GetName())
10811081
}
10821082

10831083
ginkgo.By("Selecting additional IP addresses for each node")

0 commit comments

Comments
 (0)