Skip to content

Commit bbf87f3

Browse files
committed
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
1 parent 00f5fc0 commit bbf87f3

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,6 +2308,7 @@ nncp_with_retries: ## Deploy NNCP with retries
23082308
nncp: export INTERFACE=${NNCP_INTERFACE}
23092309
nncp: export BRIDGE_NAME=${NNCP_BRIDGE}
23102310
nncp: export INTERNALAPI_PREFIX=${NETWORK_INTERNALAPI_ADDRESS_PREFIX}
2311+
nncp: export INTERNALAPI_ROUTE=${NETWORK_INTERNALAPI_ROUTE}
23112312
nncp: export NNCP_INTERNALAPI_HOST_ROUTES=${INTERNALAPI_HOST_ROUTES}
23122313
nncp: export STORAGE_PREFIX=${NETWORK_STORAGE_ADDRESS_PREFIX}
23132314
nncp: export NNCP_STORAGE_HOST_ROUTES=${STORAGE_HOST_ROUTES}

scripts/gen-netatt.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ if [ -n "$IPV4_ENABLED" ]; then
122122
"range_start": "${INTERNALAPI_PREFIX}.30",
123123
"range_end": "${INTERNALAPI_PREFIX}.70"
124124
EOF_CAT
125+
# In the data-plane adoption scenario A (where different IP subnet ranges
126+
# between next-gen and wallaby are used) the net-attach-def needs additional routes.
127+
if [ -n "$INTERNALAPI_HOST_ROUTE" ]; then
128+
cat >> ${DEPLOY_DIR}/internalapi.yaml <<EOF_CAT
129+
"routes": [
130+
{
131+
"dst": "${INTERNALAPI_HOST_ROUTES}"
132+
}
133+
]
134+
EOF_CAT
135+
fi
125136
elif [ -n "$IPV6_ENABLED" ]; then
126137
cat >> ${DEPLOY_DIR}/internalapi.yaml <<EOF_CAT
127138
"range": "fd00:bbbb::/64",
@@ -190,6 +201,17 @@ if [ -n "$IPV4_ENABLED" ]; then
190201
"range_start": "${TENANT_PREFIX}.30",
191202
"range_end": "${TENANT_PREFIX}.70"
192203
EOF_CAT
204+
# In the data-plane adoption scenario A (where different IP subnet ranges
205+
# between next-gen and wallaby are used) the net-attach-def needs additional routes.
206+
if [ -n "$TENANT_HOST_ROUTE" ]; then
207+
cat >> ${DEPLOY_DIR}/tenant.yaml <<EOF_CAT
208+
"routes": [
209+
{
210+
"dst": "${TENANT_HOST_ROUTES}"
211+
}
212+
]
213+
EOF_CAT
214+
fi
193215
elif [ -n "$IPV6_ENABLED" ]; then
194216
cat >> ${DEPLOY_DIR}/tenant.yaml <<EOF_CAT
195217
"range": "fd00:dddd::/64",

0 commit comments

Comments
 (0)