Skip to content

Commit 80ebd7a

Browse files
Merge pull request #2588 from pliurh/master
OCPBUGS-56768, OCPBUGS-56769: DownStream Merge [05-28-2025]
2 parents 5ae13ef + 339021f commit 80ebd7a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+5928
-2972
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ jobs:
282282
env:
283283
JOB_NAME: "Upgrade-Tests-${{ matrix.gateway-mode }}"
284284
OVN_HA: "false"
285+
PLATFORM_IPV4_SUPPORT: "true"
286+
PLATFORM_IPV6_SUPPORT: "false"
285287
KIND_IPV4_SUPPORT: "true"
286288
KIND_IPV6_SUPPORT: "false"
287289
OVN_HYBRID_OVERLAY_ENABLE: "false"
@@ -475,11 +477,11 @@ jobs:
475477
KIND_INSTALL_METALLB: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' || matrix.target == 'network-segmentation' }}"
476478
OVN_GATEWAY_MODE: "${{ matrix.gateway-mode }}"
477479
OVN_SECOND_BRIDGE: "${{ matrix.second-bridge == '2br' }}"
478-
KIND_IPV4_SUPPORT: "${{ matrix.ipfamily == 'IPv4' || matrix.ipfamily == 'dualstack' }}"
479-
KIND_IPV6_SUPPORT: "${{ matrix.ipfamily == 'IPv6' || matrix.ipfamily == 'dualstack' }}"
480480
ENABLE_MULTI_NET: "${{ matrix.target == 'multi-homing' || matrix.target == 'kv-live-migration' || matrix.target == 'network-segmentation' || matrix.target == 'tools' || matrix.target == 'multi-homing-helm' || matrix.target == 'traffic-flow-test-only' || matrix.routeadvertisements != '' }}"
481481
ENABLE_NETWORK_SEGMENTATION: "${{ matrix.target == 'network-segmentation' || matrix.network-segmentation == 'enable-network-segmentation' }}"
482482
DISABLE_UDN_HOST_ISOLATION: "true"
483+
PLATFORM_IPV4_SUPPORT: "${{ matrix.ipfamily == 'IPv4' || matrix.ipfamily == 'dualstack' }}"
484+
PLATFORM_IPV6_SUPPORT: "${{ matrix.ipfamily == 'IPv6' || matrix.ipfamily == 'dualstack' }}"
483485
KIND_INSTALL_KUBEVIRT: "${{ matrix.target == 'kv-live-migration' }}"
484486
OVN_COMPACT_MODE: "${{ matrix.target == 'compact-mode' }}"
485487
OVN_DUMMY_GATEWAY_BRIDGE: "${{ matrix.target == 'compact-mode' }}"
@@ -551,7 +553,8 @@ jobs:
551553
echo "GOPATH=$GOPATH" >> $GITHUB_ENV
552554
echo "$GOPATH/bin" >> $GITHUB_PATH
553555
if [ $OVN_SECOND_BRIDGE == "true" ]; then
554-
echo OVN_TEST_EX_GW_NETWORK=kindexgw >> $GITHUB_ENV
556+
# must be "greater" lexigraphically than network "kind", therefore external gateway is named xgw
557+
echo OVN_TEST_EX_GW_NETWORK=xgw >> $GITHUB_ENV
555558
echo OVN_ENABLE_EX_GW_NETWORK_BRIDGE=true >> $GITHUB_ENV
556559
fi
557560
if [[ "$JOB_NAME" == *"shard-conformance"* ]] && [ "$ADVERTISE_DEFAULT_NETWORK" == "true" ]; then
@@ -691,8 +694,8 @@ jobs:
691694
env:
692695
JOB_NAME: "DualStack-conversion-shared-${{ matrix.ha }}-${{ matrix.interconnect }}"
693696
OVN_HA: "${{ matrix.ha == 'HA' }}"
694-
KIND_IPV4_SUPPORT: "true"
695-
KIND_IPV6_SUPPORT: "false"
697+
PLATFORM_IPV4_SUPPORT: "true"
698+
PLATFORM_IPV6_SUPPORT: "false"
696699
OVN_HYBRID_OVERLAY_ENABLE: "false"
697700
OVN_GATEWAY_MODE: "shared"
698701
OVN_MULTICAST_ENABLE: "false"

contrib/kind-common

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ EOF
161161
pip install -r dev-env/requirements.txt
162162

163163
local ip_family ipv6_network
164-
if [ "$KIND_IPV4_SUPPORT" == true ] && [ "$KIND_IPV6_SUPPORT" == true ]; then
164+
if [ "$PLATFORM_IPV4_SUPPORT" == true ] && [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
165165
ip_family="dual"
166166
ipv6_network="--ipv6 --subnet=${METALLB_CLIENT_NET_SUBNET_IPV6}"
167-
elif [ "$KIND_IPV6_SUPPORT" == true ]; then
167+
elif [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
168168
ip_family="ipv6"
169169
ipv6_network="--ipv6 --subnet=${METALLB_CLIENT_NET_SUBNET_IPV6}"
170170
else
@@ -177,7 +177,7 @@ EOF
177177
docker network rm -f clientnet
178178
docker network create --subnet="${METALLB_CLIENT_NET_SUBNET_IPV4}" ${ipv6_network} --driver bridge clientnet
179179
docker network connect clientnet frr
180-
if [ "$KIND_IPV6_SUPPORT" == true ]; then
180+
if [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
181181
# Enable IPv6 forwarding in FRR
182182
docker exec frr sysctl -w net.ipv6.conf.all.forwarding=1
183183
fi
@@ -218,21 +218,21 @@ EOF
218218

219219
KIND_NODES=$(kind_get_nodes)
220220
for n in ${KIND_NODES}; do
221-
if [ "$KIND_IPV4_SUPPORT" == true ]; then
221+
if [ "$PLATFORM_IPV4_SUPPORT" == true ]; then
222222
docker exec "${n}" ip route add "${client_subnets_v4}" via "${kind_network_v4}"
223223
fi
224-
if [ "$KIND_IPV6_SUPPORT" == true ]; then
224+
if [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
225225
docker exec "${n}" ip -6 route add "${client_subnets_v6}" via "${kind_network_v6}"
226226
fi
227227
done
228228

229229
# for now, we only run one test with metalLB load balancer for which this
230230
# one svcVIP (192.168.10.0/fc00:f853:ccd:e799::) is more than enough since at a time we will only
231231
# have one load balancer service
232-
if [ "$KIND_IPV4_SUPPORT" == true ]; then
232+
if [ "$PLATFORM_IPV4_SUPPORT" == true ]; then
233233
docker exec lbclient ip route add 192.168.10.0 via "${client_network_v4}" dev eth0
234234
fi
235-
if [ "$KIND_IPV6_SUPPORT" == true ]; then
235+
if [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
236236
docker exec lbclient ip -6 route add fc00:f853:ccd:e799:: via "${client_network_v6}" dev eth0
237237
fi
238238
sleep 30
@@ -284,7 +284,7 @@ delete_metallb_dir() {
284284
kubectl_wait_pods() {
285285
# IPv6 cluster seems to take a little longer to come up, so extend the wait time.
286286
OVN_TIMEOUT=300
287-
if [ "$KIND_IPV6_SUPPORT" == true ]; then
287+
if [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
288288
OVN_TIMEOUT=480
289289
fi
290290

@@ -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
@@ -688,7 +688,7 @@ deploy_frr_external_container() {
688688
# Add route reflector client config
689689
sed -i '/remote-as 64512/a \ neighbor {{ . }} route-reflector-client' frr/frr.conf.tmpl
690690

691-
if [ "$KIND_IPV6_SUPPORT" == true ]; then
691+
if [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
692692
# Check if IPv6 address-family section exists
693693
if ! grep -q 'address-family ipv6 unicast' frr/frr.conf.tmpl; then
694694
# Add IPv6 address-family section if it doesn't exist
@@ -706,7 +706,7 @@ deploy_frr_external_container() {
706706
fi
707707
./demo.sh
708708
popd || exit 1
709-
if [ "$KIND_IPV6_SUPPORT" == true ]; then
709+
if [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
710710
# Enable IPv6 forwarding in FRR
711711
docker exec frr sysctl -w net.ipv6.conf.all.forwarding=1
712712
fi
@@ -725,10 +725,10 @@ deploy_bgp_external_server() {
725725
# | ovn-worker2 | from default pod network)
726726
# ---------------------
727727
local ip_family ipv6_network
728-
if [ "$KIND_IPV4_SUPPORT" == true ] && [ "$KIND_IPV6_SUPPORT" == true ]; then
728+
if [ "$PLATFORM_IPV4_SUPPORT" == true ] && [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
729729
ip_family="dual"
730730
ipv6_network="--ipv6 --subnet=${BGP_SERVER_NET_SUBNET_IPV6}"
731-
elif [ "$KIND_IPV6_SUPPORT" == true ]; then
731+
elif [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
732732
ip_family="ipv6"
733733
ipv6_network="--ipv6 --subnet=${BGP_SERVER_NET_SUBNET_IPV6}"
734734
else
@@ -746,7 +746,7 @@ deploy_bgp_external_server() {
746746
bgp_network_frr_v4=$($OCI_BIN inspect -f '{{index .NetworkSettings.Networks "bgpnet" "IPAddress"}}' frr)
747747
echo "FRR kind network IPv4: ${bgp_network_frr_v4}"
748748
$OCI_BIN exec bgpserver ip route replace default via "$bgp_network_frr_v4"
749-
if [ "$KIND_IPV6_SUPPORT" == true ] ; then
749+
if [ "$PLATFORM_IPV6_SUPPORT" == true ] ; then
750750
bgp_network_frr_v6=$($OCI_BIN inspect -f '{{index .NetworkSettings.Networks "bgpnet" "GlobalIPv6Address"}}' frr)
751751
echo "FRR kind network IPv6: ${bgp_network_frr_v6}"
752752
$OCI_BIN exec bgpserver ip -6 route replace default via "$bgp_network_frr_v6"
@@ -781,7 +781,7 @@ install_ffr_k8s() {
781781
# Allow receiving the bgp external server's prefix
782782
sed -i '/mode: filtered/a\ prefixes:\n - prefix: '"${BGP_SERVER_NET_SUBNET_IPV4}"'' receive_filtered.yaml
783783
# If IPv6 is enabled, add the IPv6 prefix as well
784-
if [ "$KIND_IPV6_SUPPORT" == true ]; then
784+
if [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
785785
# Find all line numbers where the IPv4 prefix is defined
786786
IPv6_LINE=" - prefix: ${BGP_SERVER_NET_SUBNET_IPV6}"
787787
# Process each occurrence of the IPv4 prefix
@@ -827,7 +827,7 @@ EOF
827827
# Get subnet information
828828
subnet_json=$(kubectl get node $node -o jsonpath='{.metadata.annotations.k8s\.ovn\.org/node-subnets}')
829829

830-
if [ "$KIND_IPV4_SUPPORT" == true ]; then
830+
if [ "$PLATFORM_IPV4_SUPPORT" == true ]; then
831831
# Extract IPv4 address (first address)
832832
node_ipv4=$(echo "$node_ips" | awk '{print $1}')
833833
ipv4_subnet=$(echo "$subnet_json" | jq -r '.default[0]')
@@ -840,7 +840,7 @@ EOF
840840
fi
841841

842842
# Add IPv6 route if enabled
843-
if [ "$KIND_IPV6_SUPPORT" == true ]; then
843+
if [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
844844
# Extract IPv6 address (second address, if present)
845845
node_ipv6=$(echo "$node_ips" | awk '{print $2}')
846846
ipv6_subnet=$(echo "$subnet_json" | jq -r '.default[1] // empty')

contrib/kind-helm.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ set_default_params() {
8080
fi
8181

8282
# Hard code ipv4 support until IPv6 is implemented
83-
export KIND_IPV4_SUPPORT=true
83+
export PLATFORM_IPV4_SUPPORT=true
8484

8585
export OVN_ENABLE_DNSNAMERESOLVER=${OVN_ENABLE_DNSNAMERESOLVER:-false}
8686
}
@@ -248,7 +248,7 @@ check_dependencies() {
248248
done
249249

250250
# check for currently unsupported features
251-
[ "${KIND_IPV6_SUPPORT}" == "true" ] && { &>1 echo "Fatal: KIND_IPV6_SUPPORT support not implemented yet"; exit 1; } ||:
251+
[ "${PLATFORM_IPV6_SUPPORT}" == "true" ] && { &>1 echo "Fatal: PLATFORM_IPV6_SUPPORT support not implemented yet"; exit 1; } ||:
252252
}
253253

254254
helm_prereqs() {

contrib/kind.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ parse_args() {
220220
;;
221221
-kt | --keep-taint ) KIND_REMOVE_TAINT=false
222222
;;
223-
-n4 | --no-ipv4 ) KIND_IPV4_SUPPORT=false
223+
-n4 | --no-ipv4 ) PLATFORM_IPV4_SUPPORT=false
224224
;;
225-
-i6 | --ipv6 ) KIND_IPV6_SUPPORT=true
225+
-i6 | --ipv6 ) PLATFORM_IPV6_SUPPORT=true
226226
;;
227227
-is | --ipsec ) ENABLE_IPSEC=true
228228
;;
@@ -390,8 +390,8 @@ print_params() {
390390
echo "KIND_DNS_DOMAIN = $KIND_DNS_DOMAIN"
391391
echo "KIND_CONFIG_FILE = $KIND_CONFIG"
392392
echo "KIND_REMOVE_TAINT = $KIND_REMOVE_TAINT"
393-
echo "KIND_IPV4_SUPPORT = $KIND_IPV4_SUPPORT"
394-
echo "KIND_IPV6_SUPPORT = $KIND_IPV6_SUPPORT"
393+
echo "PLATFORM_IPV4_SUPPORT = $PLATFORM_IPV4_SUPPORT"
394+
echo "PLATFORM_IPV6_SUPPORT = $PLATFORM_IPV6_SUPPORT"
395395
echo "ENABLE_IPSEC = $ENABLE_IPSEC"
396396
echo "KIND_ALLOW_SYSTEM_WRITES = $KIND_ALLOW_SYSTEM_WRITES"
397397
echo "KIND_EXPERIMENTAL_PROVIDER = $KIND_EXPERIMENTAL_PROVIDER"
@@ -556,8 +556,8 @@ set_default_params() {
556556
KIND_DNS_DOMAIN=${KIND_DNS_DOMAIN:-"cluster.local"}
557557
KIND_CONFIG=${KIND_CONFIG:-${DIR}/kind.yaml.j2}
558558
KIND_REMOVE_TAINT=${KIND_REMOVE_TAINT:-true}
559-
KIND_IPV4_SUPPORT=${KIND_IPV4_SUPPORT:-true}
560-
KIND_IPV6_SUPPORT=${KIND_IPV6_SUPPORT:-false}
559+
PLATFORM_IPV4_SUPPORT=${PLATFORM_IPV4_SUPPORT:-true}
560+
PLATFORM_IPV6_SUPPORT=${PLATFORM_IPV6_SUPPORT:-false}
561561
ENABLE_IPSEC=${ENABLE_IPSEC:-false}
562562
OVN_HYBRID_OVERLAY_ENABLE=${OVN_HYBRID_OVERLAY_ENABLE:-false}
563563
OVN_DISABLE_SNAT_MULTIPLE_GWS=${OVN_DISABLE_SNAT_MULTIPLE_GWS:-false}
@@ -669,7 +669,7 @@ set_default_params() {
669669
}
670670

671671
check_ipv6() {
672-
if [ "$KIND_IPV6_SUPPORT" == true ]; then
672+
if [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
673673
# Collect additional IPv6 data on test environment
674674
ERROR_FOUND=false
675675
TMPVAR=$(sysctl net.ipv6.conf.all.forwarding | awk '{print $3}')
@@ -705,23 +705,23 @@ check_ipv6() {
705705
}
706706

707707
set_cluster_cidr_ip_families() {
708-
if [ "$KIND_IPV4_SUPPORT" == true ] && [ "$KIND_IPV6_SUPPORT" == false ]; then
708+
if [ "$PLATFORM_IPV4_SUPPORT" == true ] && [ "$PLATFORM_IPV6_SUPPORT" == false ]; then
709709
IP_FAMILY=""
710710
NET_CIDR=$NET_CIDR_IPV4
711711
SVC_CIDR=$SVC_CIDR_IPV4
712712
echo "IPv4 Only Support: --net-cidr=$NET_CIDR --svc-cidr=$SVC_CIDR"
713-
elif [ "$KIND_IPV4_SUPPORT" == false ] && [ "$KIND_IPV6_SUPPORT" == true ]; then
713+
elif [ "$PLATFORM_IPV4_SUPPORT" == false ] && [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
714714
IP_FAMILY="ipv6"
715715
NET_CIDR=$NET_CIDR_IPV6
716716
SVC_CIDR=$SVC_CIDR_IPV6
717717
echo "IPv6 Only Support: --net-cidr=$NET_CIDR --svc-cidr=$SVC_CIDR"
718-
elif [ "$KIND_IPV4_SUPPORT" == true ] && [ "$KIND_IPV6_SUPPORT" == true ]; then
718+
elif [ "$PLATFORM_IPV4_SUPPORT" == true ] && [ "$PLATFORM_IPV6_SUPPORT" == true ]; then
719719
IP_FAMILY="dual"
720720
NET_CIDR=$NET_CIDR_IPV4,$NET_CIDR_IPV6
721721
SVC_CIDR=$SVC_CIDR_IPV4,$SVC_CIDR_IPV6
722722
echo "Dual Stack Support: --net-cidr=$NET_CIDR --svc-cidr=$SVC_CIDR"
723723
else
724-
echo "Invalid setup. KIND_IPV4_SUPPORT and/or KIND_IPV6_SUPPORT must be true."
724+
echo "Invalid setup. PLATFORM_IPV4_SUPPORT and/or PLATFORM_IPV6_SUPPORT must be true."
725725
exit 1
726726
fi
727727
}
@@ -1096,19 +1096,19 @@ 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

11071107
# run_script_in_container should be used when kind.sh is run nested in a container
11081108
# and makes sure the control-plane node is reachable by substituting 127.0.0.1
11091109
# with the control-plane container's IP
11101110
run_script_in_container() {
1111-
if [ "$KIND_IPV4_SUPPORT" == true ]; then
1111+
if [ "$PLATFORM_IPV4_SUPPORT" == true ]; then
11121112
local master_ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${KIND_CLUSTER_NAME}-control-plane | head -n 1)
11131113
sed -i -- "s/server: .*/server: https:\/\/$master_ip:6443/g" $KUBECONFIG
11141114
else

docs/ci/ci.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ export OVN_EMPTY_LB_EVENTS=[true|false]
160160
export OVN_HA=[true|false]
161161
export OVN_DISABLE_SNAT_MULTIPLE_GWS=[true|false]
162162
export OVN_GATEWAY_MODE=["local"|"shared"]
163-
export KIND_IPV4_SUPPORT=[true|false]
164-
export KIND_IPV6_SUPPORT=[true|false]
163+
export PLATFORM_IPV4_SUPPORT=[true|false]
164+
export PLATFORM_IPV6_SUPPORT=[true|false]
165165
# not required for the OVN Kind installation script, but export this already for later
166166
OVN_SECOND_BRIDGE=[true|false]
167167
```
@@ -181,8 +181,8 @@ export OVN_EMPTY_LB_EVENTS=true
181181
export OVN_HA=false
182182
export OVN_DISABLE_SNAT_MULTIPLE_GWS=false
183183
export OVN_GATEWAY_MODE="local"
184-
export KIND_IPV4_SUPPORT=true
185-
export KIND_IPV6_SUPPORT=false
184+
export PLATFORM_IPV4_SUPPORT=true
185+
export PLATFORM_IPV6_SUPPORT=false
186186
# not required for the OVN Kind installation script, but export this already for later
187187
export OVN_SECOND_BRIDGE=false
188188
```
@@ -353,13 +353,13 @@ ok github.com/ovn-org/ovn-kubernetes/test/e2e 12.371s
353353
### IPv6 tests
354354

355355
To skip the IPv4 only tests (in a IPv6 only deployment), pass the
356-
`KIND_IPV6_SUPPORT=true` environmental variable to `make`:
356+
`PLATFORM_IPV6_SUPPORT=true` environmental variable to `make`:
357357

358358
```
359359
$ cd $GOPATH/src/github.com/ovn-org/ovn-kubernetes
360360
361361
$ pushd test
362-
$ KIND_IPV6_SUPPORT=true make shard-conformance
362+
$ PLATFORM_IPV6_SUPPORT=true make shard-conformance
363363
$ popd
364364
```
365365

docs/installation/launching-ovn-kubernetes-on-kind.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ $ cd ../dist/images/
324324
$ make fedora-image
325325
326326
$ cd ../../contrib/
327-
$ KIND_IPV4_SUPPORT=false KIND_IPV6_SUPPORT=true ./kind.sh
327+
$ PLATFORM_IPV4_SUPPORT=false PLATFORM_IPV6_SUPPORT=true ./kind.sh
328328
```
329329

330330
Once `kind.sh` completes, setup kube config file:
@@ -428,7 +428,7 @@ $ cd ../dist/images/
428428
$ make fedora-image
429429
430430
$ cd ../../contrib/
431-
$ KIND_IPV4_SUPPORT=true KIND_IPV6_SUPPORT=true K8S_VERSION=v1.32.3 ./kind.sh
431+
$ PLATFORM_IPV4_SUPPORT=true PLATFORM_IPV6_SUPPORT=true K8S_VERSION=v1.32.3 ./kind.sh
432432
```
433433

434434
Once `kind.sh` completes, setup kube config file:

0 commit comments

Comments
 (0)