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
26 changes: 24 additions & 2 deletions hack/vpn-gateway/bird-gw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protocol kernel {
}


# separate-appnetwork gw-a1 peers on VLAN 100 (ASN 64512)
# separate-appnetwork-v4 gw-a1 peers on VLAN 100 (ASN 64512)
# Also used by dual-stack gw-ds (both IPv4 and IPv6)
protocol bgp GW4_A1 from LINK {
local 169.254.10.150 port 10179 as 4200000000;
Expand All @@ -77,7 +77,7 @@ protocol bgp GW6_DS from LINK {
};
}

# separate-appnetwork gw-a2 peers on VLAN 200 (ASN 64513)
# separate-appnetwork-v4 gw-a2 peers on VLAN 200 (ASN 64513)
protocol bgp GW4_A2 from LINK {
local 169.254.11.150 port 10179 as 4200000000;
neighbor range 0.0.0.0/0 port 10179 as 64513;
Expand Down Expand Up @@ -275,3 +275,25 @@ protocol bgp GW4_TCPAO_B2_2 from LINK {
export filter bgp_announce;
};
}

# separate-appnetwork-v6 gw-v6a1 peers on VLAN 1300 (ASN 64522, IPv6-only)
protocol bgp GW6_V6A1 from LINK {
local fd00:cafe:70::150 port 10179 as 4200000000;
neighbor range ::/0 port 10179 as 64522;
dynamic name "GW6_V6A1_";
ipv6 {
import all;
export filter bgp_announce6;
};
}

# separate-appnetwork-v6 gw-v6a2 peers on VLAN 1400 (ASN 64523, IPv6-only)
protocol bgp GW6_V6A2 from LINK {
local fd00:cafe:71::150 port 10179 as 4200000000;
neighbor range ::/0 port 10179 as 64523;
dynamic name "GW6_V6A2_";
ipv6 {
import all;
export filter bgp_announce6;
};
}
16 changes: 13 additions & 3 deletions hack/vpn-gateway/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ sysctl -w net.ipv4.fib_multipath_hash_policy=1
sysctl -w net.ipv4.conf.all.forwarding=1
sysctl -w net.ipv6.conf.all.forwarding=1

# VLAN 100 — separate-appnetwork gw-a1 + dual-stack gw-ds (shared)
# VLAN 100 — separate-appnetwork-v4 gw-a1 + dual-stack gw-ds (shared)
ip link add link eth0 name vlan1 type vlan id 100
ip link set vlan1 up
ip addr add 169.254.10.150/24 dev vlan1
ip addr add fd00:cafe:10::150/64 dev vlan1
ip addr add 200.100.0.100/32 dev vlan1

# VLAN 200 — separate-appnetwork gw-a2
# VLAN 200 — separate-appnetwork-v4 gw-a2
ip link add link eth0 name vlan2 type vlan id 200
ip link set vlan2 up
ip addr add 169.254.11.150/24 dev vlan2
Expand Down Expand Up @@ -72,8 +72,18 @@ ip link add link eth0 name vlan12 type vlan id 1200
ip link set vlan12 up
ip addr add 169.254.111.150/24 dev vlan12

# VLAN 1300 — separate-appnetwork-v6 gw-v6a1
ip link add link eth0 name vlan13 type vlan id 1300
ip link set vlan13 up
ip addr add fd00:cafe:70::150/64 dev vlan13

# VLAN 1400 — separate-appnetwork-v6 gw-v6a2
ip link add link eth0 name vlan14 type vlan id 1400
ip link set vlan14 up
ip addr add fd00:cafe:71::150/64 dev vlan14

ethtool -K eth0 tx off

echo "VPN Gateway ready on VLAN 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200"
echo "VPN Gateway ready on VLAN 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400"

/usr/sbin/bird -d -c /etc/bird/bird-gw.conf
69 changes: 55 additions & 14 deletions test/e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ MULTUS_VERSION ?= v4.1.2
WHEREABOUTS_VERSION ?= v0.8.0

# Suites
SUITES_IPV4 ?= shared-appnetwork separate-appnetwork separate-static-appnetwork sctp-multihoming ipv4-simple pod-cache-label tcp-ao
SUITES_IPV4 ?= shared-appnetwork separate-appnetwork-v4 separate-static-appnetwork sctp-multihoming ipv4-simple pod-cache-label tcp-ao
SUITES_DS ?= dual-stack-simple
SUITES_IPV6 ?= separate-appnetwork-v6

# Test flags (e.g., make test GINKGO_FLAGS="--junit-report=report.xml")
GINKGO_FLAGS ?=
Expand Down Expand Up @@ -206,24 +207,45 @@ undeploy-ipv4-simple: ## Undeploy ipv4-simple topology.
$(KUBECTL) delete namespace $$NS --ignore-not-found=true

#################################################################################
##@ Suite: separate-appnetwork
##@ Suite: separate-appnetwork-v4
################################################################################

.PHONY: separate-appnetwork
separate-appnetwork: deploy-separate-appnetwork test-separate-appnetwork ## Deploy and test separate-appnetwork suite.
.PHONY: separate-appnetwork-v4
separate-appnetwork-v4: deploy-separate-appnetwork-v4 test-separate-appnetwork-v4 ## Deploy and test separate-appnetwork-v4 suite.

.PHONY: deploy-separate-appnetwork
deploy-separate-appnetwork: cluster ## Deploy separate-appnetwork topology.
$(call deploy-suite,e2e-separate-appnetwork,$(shell pwd)/suites/separate-appnetwork,separate-appnet,sllbr-gw-a1 sllbr-gw-a2)
.PHONY: deploy-separate-appnetwork-v4
deploy-separate-appnetwork-v4: cluster ## Deploy separate-appnetwork-v4 topology.
$(call deploy-suite,e2e-separate-appnetwork-v4,$(shell pwd)/suites/separate-appnetwork-v4,separate-appnet-v4,sllbr-gw-a1 sllbr-gw-a2)

.PHONY: test-separate-appnetwork
test-separate-appnetwork: ## Run e2e tests for separate-appnetwork suite.
cd $(PROJECT_ROOT)/test/e2e && go run github.com/onsi/ginkgo/v2/ginkgo -v --tags=e2e --focus="Separate App Network" $(GINKGO_FLAGS)
.PHONY: test-separate-appnetwork-v4
test-separate-appnetwork-v4: ## Run e2e tests for separate-appnetwork-v4 suite.
cd $(PROJECT_ROOT)/test/e2e && go run github.com/onsi/ginkgo/v2/ginkgo -v --tags=e2e --focus="Separate App Network IPv4" $(GINKGO_FLAGS)

.PHONY: undeploy-separate-appnetwork
undeploy-separate-appnetwork: ## Undeploy separate-appnetwork topology.
@NS=e2e-separate-appnetwork; \
$(KUBECTL) delete validatingwebhookconfiguration meridio-2-validating-webhook-configuration-separate-appnet --ignore-not-found=true; \
.PHONY: undeploy-separate-appnetwork-v4
undeploy-separate-appnetwork-v4: ## Undeploy separate-appnetwork-v4 topology.
@NS=e2e-separate-appnetwork-v4; \
$(KUBECTL) delete validatingwebhookconfiguration meridio-2-validating-webhook-configuration-separate-appnet-v4 --ignore-not-found=true; \
$(KUBECTL) delete namespace $$NS --ignore-not-found=true

#################################################################################
##@ Suite: separate-appnetwork-v6
################################################################################

.PHONY: separate-appnetwork-v6
separate-appnetwork-v6: deploy-separate-appnetwork-v6 test-separate-appnetwork-v6 ## Deploy and test separate-appnetwork-v6 suite.

.PHONY: deploy-separate-appnetwork-v6
deploy-separate-appnetwork-v6: cluster ## Deploy separate-appnetwork-v6 topology.
$(call deploy-suite,e2e-separate-appnetwork-v6,$(shell pwd)/suites/separate-appnetwork-v6,separate-appnet-v6,sllbr-gw-v6a1 sllbr-gw-v6a2)

.PHONY: test-separate-appnetwork-v6
test-separate-appnetwork-v6: ## Run e2e tests for separate-appnetwork-v6 suite.
cd $(PROJECT_ROOT)/test/e2e && go run github.com/onsi/ginkgo/v2/ginkgo -v --tags=e2e --focus="Separate App Network IPv6" $(GINKGO_FLAGS)

.PHONY: undeploy-separate-appnetwork-v6
undeploy-separate-appnetwork-v6: ## Undeploy separate-appnetwork-v6 topology.
@NS=e2e-separate-appnetwork-v6; \
$(KUBECTL) delete validatingwebhookconfiguration meridio-2-validating-webhook-configuration-separate-appnet-v6 --ignore-not-found=true; \
$(KUBECTL) delete namespace $$NS --ignore-not-found=true

##############################################################################
Expand Down Expand Up @@ -441,6 +463,25 @@ test-dual-stack: ## Run all dual-stack e2e tests in parallel.
undeploy-dual-stack: ## Undeploy all dual-stack suites.
@for suite in $(SUITES_DS); do $(MAKE) undeploy-$$suite; done

################################################################################
##@ All IPv6 suites
################################################################################

.PHONY: ipv6
ipv6: deploy-ipv6 test-ipv6 ## Deploy and test all IPv6 suites.

.PHONY: deploy-ipv6
deploy-ipv6: ## Deploy all IPv6 suites.
@for suite in $(SUITES_IPV6); do $(MAKE) deploy-$$suite || exit 1; done

.PHONY: test-ipv6
test-ipv6: ## Run all IPv6 e2e tests in parallel.
cd $(PROJECT_ROOT)/test/e2e && go run github.com/onsi/ginkgo/v2/ginkgo -v -p --tags=e2e --label-filter=ipv6 $(GINKGO_FLAGS)

.PHONY: undeploy-ipv6
undeploy-ipv6: ## Undeploy all IPv6 suites.
@for suite in $(SUITES_IPV6); do $(MAKE) undeploy-$$suite; done

################################################################################
##@ Suite: openshift-crc
################################################################################
Expand Down
Loading