From 5e24ee338aa52e69d471d63be27658abd38e938f Mon Sep 17 00:00:00 2001 From: Arnau Verdaguer Date: Wed, 8 Jan 2025 14:46:51 +0100 Subject: [PATCH] Add internalapi routes for scenario A adoption Doing data-plane adoption while testing scenario A (different subnets between wallaby and next-gen) will result in connectivity problem since pods will try to reach old CP using default route (since both CP are on different subnets) and won't be able to reach it. Adding this route in internalapi to support data-plane adoption scenario A gates. Currently only one route can be added, if needed logic can be improved to include more than one route. Ref: OSPRH-5602 --- Makefile | 5 +++-- scripts/gen-netatt.sh | 26 ++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 91e51298..de9c088e 100644 --- a/Makefile +++ b/Makefile @@ -51,10 +51,9 @@ NETWORK_STORAGE_ADDRESS_PREFIX ?= 172.18.0 NETWORK_TENANT_ADDRESS_PREFIX ?= 172.19.0 NETWORK_STORAGEMGMT_ADDRESS_PREFIX ?= 172.20.0 NETWORK_DESIGNATE_ADDRESS_PREFIX ?= 172.28.0 +# Additional routes that will be forwarded to nncp and net-attach-def INTERNALAPI_HOST_ROUTES ?= -STORAGE_HOST_ROUTES ?= TENANT_HOST_ROUTES ?= -STORAGEMGMT_HOST_ROUTES ?= # network isolation NETWORK_ISOLATION ?= true @@ -2395,6 +2394,8 @@ netattach: export DESIGNATE_PREFIX=${NETWORK_DESIGNATE_ADDRESS_PREFIX} netattach: export VLAN_START=${NETWORK_VLAN_START} netattach: export VLAN_STEP=${NETWORK_VLAN_STEP} netattach: export CTLPLANE_IP_ADDRESS_PREFIX=${NNCP_CTLPLANE_IP_ADDRESS_PREFIX} +netattach: export NETATT_INTERNALAPI_HOST_ROUTES=${INTERNALAPI_HOST_ROUTES} +netattach: export NETATT_TENANT_HOST_ROUTES=${TENANT_HOST_ROUTES} netattach: namespace ## Creates network-attachment-definitions for the networks the workers are attached via nncp $(eval $(call vars,$@,netattach)) bash scripts/gen-netatt.sh diff --git a/scripts/gen-netatt.sh b/scripts/gen-netatt.sh index 91416341..9bceaf6d 100644 --- a/scripts/gen-netatt.sh +++ b/scripts/gen-netatt.sh @@ -120,8 +120,19 @@ if [ -n "$IPV4_ENABLED" ]; then cat >> ${DEPLOY_DIR}/internalapi.yaml <> ${DEPLOY_DIR}/internalapi.yaml <> ${DEPLOY_DIR}/internalapi.yaml <> ${DEPLOY_DIR}/tenant.yaml <> ${DEPLOY_DIR}/tenant.yaml <> ${DEPLOY_DIR}/tenant.yaml <