Skip to content

Commit 5e636ad

Browse files
authored
Revert "OCPBUGS-56202: DownStream Merge [07-25-2025]"
1 parent c1ecb1a commit 5e636ad

File tree

126 files changed

+3288
-6279
lines changed

Some content is hidden

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

126 files changed

+3288
-6279
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ on:
44
merge_group:
55
pull_request:
66
branches: [ master ]
7-
# Only run jobs if at least one non-doc file is changed
8-
paths-ignore:
9-
- '**/*.md'
10-
- 'mkdocs.yml'
117
schedule:
128
- cron: '0 */12 * * *'
139
workflow_dispatch:

contrib/kind-common

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,30 @@ install_kubevirt() {
388388

389389
local kubevirt_stable_release_url=$(get_kubevirt_release_url "stable")
390390
kubectl -n kubevirt patch kubevirt kubevirt --type=json --patch '[{"op":"add","path":"/spec/configuration/network","value":{}},{"op":"add","path":"/spec/configuration/network/binding","value":{"l2bridge":{"domainAttachmentType":"managedTap","migration":{}}}}]'
391+
392+
if [ ! -d "./bin" ]
393+
then
394+
mkdir -p ./bin
395+
if_error_exit "Failed to create bin dir!"
396+
fi
397+
398+
if [[ "$OSTYPE" == "linux-gnu" ]]; then
399+
OS_TYPE="linux"
400+
elif [[ "$OSTYPE" == "darwin"* ]]; then
401+
OS_TYPE="darwin"
402+
fi
403+
404+
pushd ./bin
405+
if [ ! -f ./virtctl ]; then
406+
kubevirt_stable_release_url=$(get_kubevirt_release_url "stable")
407+
cli_name="virtctl-${kubevirt_stable_release_url##*/}-${OS_TYPE}-${ARCH}"
408+
curl -LO "${kubevirt_stable_release_url}/${cli_name}"
409+
mv ${cli_name} virtctl
410+
if_error_exit "Failed to download virtctl!"
411+
fi
412+
popd
391413

414+
chmod +x ./bin/virtctl
392415
}
393416

394417
install_cert_manager() {

dist/images/Dockerfile.fedora

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARG OVN_FROM=koji
1414
#############################################
1515
# Stage to get OVN and OVS RPMs from source #
1616
#############################################
17-
FROM quay.io/fedora/fedora:42 AS ovnbuilder
17+
FROM quay.io/fedora/fedora:41 AS ovnbuilder
1818

1919
USER root
2020

@@ -78,8 +78,8 @@ RUN git log -n 1
7878
########################################
7979
# Stage to download OVN RPMs from koji #
8080
########################################
81-
FROM quay.io/fedora/fedora:42 AS kojidownloader
82-
ARG ovnver=ovn-24.09.2-71.fc42
81+
FROM quay.io/fedora/fedora:41 AS kojidownloader
82+
ARG ovnver=ovn-24.09.2-71.fc41
8383

8484
USER root
8585

@@ -99,14 +99,14 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ] || [ -z "$TARGETPLATFORM"] ; then k
9999
######################################
100100
# Stage to copy OVN RPMs from source #
101101
######################################
102-
FROM quay.io/fedora/fedora:42 AS source
102+
FROM quay.io/fedora/fedora:41 AS source
103103
COPY --from=ovnbuilder /root/ovn/rpm/rpmbuild/RPMS/x86_64/*.rpm /
104104
COPY --from=ovnbuilder /root/ovs/rpm/rpmbuild/RPMS/x86_64/*.rpm /
105105

106106
####################################
107107
# Stage to copy OVN RPMs from koji #
108108
####################################
109-
FROM quay.io/fedora/fedora:42 AS koji
109+
FROM quay.io/fedora/fedora:41 AS koji
110110

111111
COPY --from=kojidownloader /*.rpm /
112112

dist/images/ovnkube.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,12 +2097,6 @@ ovnkube-controller-with-node() {
20972097
ovn_stateless_netpol_enable_flag="--enable-stateless-netpol"
20982098
fi
20992099

2100-
ovn_disable_requestedchassis_flag=
2101-
if [[ ${ovn_disable_requestedchassis} == "true" ]]; then
2102-
ovn_disable_requestedchassis_flag="--disable-requestedchassis"
2103-
fi
2104-
echo "ovn_disable_requestedchassis_flag=${ovn_disable_requestedchassis_flag}"
2105-
21062100
echo "=============== ovnkube-controller-with-node --init-ovnkube-controller-with-node=========="
21072101
/usr/bin/ovnkube --init-ovnkube-controller ${K8S_NODE} --init-node ${K8S_NODE} \
21082102
${anp_enabled_flag} \
@@ -2156,7 +2150,6 @@ ovnkube-controller-with-node() {
21562150
${ssl_opts} \
21572151
${network_qos_enabled_flag} \
21582152
${ovn_enable_dnsnameresolver_flag} \
2159-
${ovn_disable_requestedchassis_flag} \
21602153
--cluster-subnets ${net_cidr} --k8s-service-cidr=${svc_cidr} \
21612154
--export-ovs-metrics \
21622155
--gateway-mode=${ovn_gateway_mode} ${ovn_gateway_opts} \

dist/templates/ovn-setup.yaml.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ spec:
8989
networkSelectors:
9090
- networkSelectionType: DefaultNetwork
9191
nodeSelector: {}
92-
frrConfigurationSelector:
93-
matchLabels:
94-
name: receive-all
92+
frrConfigurationSelector: {}
9593
advertisements:
9694
- "PodNetwork"
9795
{%- endif %}

go-controller/.golangci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ linters-settings:
6060
# Other frequently used deps
6161
- pkg: github.com/ovn-kubernetes/libovsdb/ovsdb
6262
alias: ""
63-
- pkg: github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/util
64-
alias: nodeutil
65-
- pkg: github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/types
66-
alias: nodetypes
6763

6864
revive:
6965
rules:

go-controller/go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/google/uuid v1.6.0
2424
github.com/gorilla/mux v1.8.0
2525
github.com/k8snetworkplumbingwg/govdpa v0.1.5-0.20230926073613-07c1031aea47
26-
github.com/k8snetworkplumbingwg/ipamclaims v0.5.0-alpha
26+
github.com/k8snetworkplumbingwg/ipamclaims v0.4.0-alpha
2727
github.com/k8snetworkplumbingwg/multi-networkpolicy v1.0.1
2828
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.6.0
2929
github.com/k8snetworkplumbingwg/sriovnet v1.2.1-0.20230427090635-4929697df2dc
@@ -57,9 +57,9 @@ require (
5757
gopkg.in/fsnotify/fsnotify.v1 v1.4.7
5858
gopkg.in/gcfg.v1 v1.2.3
5959
gopkg.in/natefinch/lumberjack.v2 v2.2.1
60-
k8s.io/api v0.32.5
61-
k8s.io/apimachinery v0.32.5
62-
k8s.io/client-go v0.32.5
60+
k8s.io/api v0.32.3
61+
k8s.io/apimachinery v0.32.3
62+
k8s.io/client-go v0.32.3
6363
k8s.io/component-helpers v0.32.3
6464
k8s.io/klog/v2 v2.130.1
6565
k8s.io/kubernetes v1.32.6
@@ -125,7 +125,7 @@ require (
125125
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
126126
go.opencensus.io v0.24.0 // indirect
127127
golang.org/x/crypto v0.36.0 // indirect
128-
golang.org/x/oauth2 v0.27.0 // indirect
128+
golang.org/x/oauth2 v0.23.0 // indirect
129129
golang.org/x/term v0.30.0 // indirect
130130
golang.org/x/text v0.23.0 // indirect
131131
golang.org/x/tools v0.26.0 // indirect

go-controller/go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,8 @@ github.com/juju/version v0.0.0-20161031051906-1f41e27e54f2/go.mod h1:kE8gK5X0CIm
494494
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
495495
github.com/k8snetworkplumbingwg/govdpa v0.1.5-0.20230926073613-07c1031aea47 h1:iSncnlC+rtlNOIpPa3fbqQMhpTscGJIlkiWaPl1VcS4=
496496
github.com/k8snetworkplumbingwg/govdpa v0.1.5-0.20230926073613-07c1031aea47/go.mod h1:SPaDIyUmwN03Bgn0u/mhoiE4o/+koeKh11VUsdsUX0U=
497-
github.com/k8snetworkplumbingwg/ipamclaims v0.5.0-alpha h1:b3iHeks/KTzhG2dNanaUZcFEJwJbYBZY16jxCaVv9i8=
498-
github.com/k8snetworkplumbingwg/ipamclaims v0.5.0-alpha/go.mod h1:MGaMX1tJ7MlHDee4/xmqp3guQh+eDiuCLAauqD9K11Q=
497+
github.com/k8snetworkplumbingwg/ipamclaims v0.4.0-alpha h1:ss+EP77GlQmh90hGKpnAG4Q3VVxRlB7GoncemaPtO4g=
498+
github.com/k8snetworkplumbingwg/ipamclaims v0.4.0-alpha/go.mod h1:qlR+sKxQ2OGfwhFCuXSd7rJ/GgC38vQBeHKQ7f2YnpI=
499499
github.com/k8snetworkplumbingwg/multi-networkpolicy v1.0.1 h1:Egj1hEVYNXWFlKpgzAXxe/2o8VNiVcAJLrKzlinILQo=
500500
github.com/k8snetworkplumbingwg/multi-networkpolicy v1.0.1/go.mod h1:kEJ4WM849yNmXekuSXLRwb+LaZ9usC06O8JgoAIq+f4=
501501
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.6.0 h1:BT3ghAY0q7lWib9rz+tVXDFkm27dJV6SLCn7TunZwo4=
@@ -945,8 +945,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
945945
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
946946
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
947947
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
948-
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
949-
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
948+
golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
949+
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
950950
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
951951
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
952952
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1317,26 +1317,26 @@ k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ=
13171317
k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8=
13181318
k8s.io/api v0.22.7/go.mod h1:7hejA1BgBEiSsWljUyRkIjj+AISXO16IwsaDgFjJsQE=
13191319
k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ=
1320-
k8s.io/api v0.32.5 h1:uqjjsYo1kTJr5NIcoIaP9F+TgXgADH7nKQx91FDAhtk=
1321-
k8s.io/api v0.32.5/go.mod h1:bXXFU3fGCZ/eFMZvfHZC69PeGbXEL4zzjuPVzOxHF64=
1320+
k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls=
1321+
k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k=
13221322
k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY=
13231323
k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss=
13241324
k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
13251325
k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
13261326
k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc=
13271327
k8s.io/apimachinery v0.22.7/go.mod h1:ZvVLP5iLhwVFg2Yx9Gh5W0um0DUauExbRhe+2Z8I1EU=
13281328
k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM=
1329-
k8s.io/apimachinery v0.32.5 h1:6We3aJ6crC0ap8EhsEXcgX3LpI6SEjubpiOMXLROwPM=
1330-
k8s.io/apimachinery v0.32.5/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
1329+
k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U=
1330+
k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
13311331
k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU=
13321332
k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM=
13331333
k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q=
13341334
k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y=
13351335
k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k=
13361336
k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0=
13371337
k8s.io/client-go v0.22.7/go.mod h1:pGU/tWSzzvsYT7M3npHhoZ3Jh9qJTTIvFvDtWuW31dw=
1338-
k8s.io/client-go v0.32.5 h1:huFmQMzgWu0z4kbWsuZci+Gt4Fo72I4CcrvhToZ/Qp0=
1339-
k8s.io/client-go v0.32.5/go.mod h1:Qchw6f9WIVrur7DKojAHpRgGLcANT0RLIvF39Jz58xA=
1338+
k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU=
1339+
k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY=
13401340
k8s.io/code-generator v0.22.7/go.mod h1:iOZwYADSgFPNGWfqHFfg1V0TNJnl1t0WyZluQp4baqU=
13411341
k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk=
13421342
k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk=

go-controller/pkg/clustermanager/routeadvertisements/controller.go

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -951,18 +951,10 @@ func (c *Controller) updateRAStatus(ra *ratypes.RouteAdvertisements, hadUpdates
951951
return nil
952952
}
953953

954-
var updateStatus bool
955954
condition := meta.FindStatusCondition(ra.Status.Conditions, "Accepted")
956-
switch {
957-
case condition == nil:
958-
fallthrough
959-
case condition.ObservedGeneration != ra.Generation:
960-
fallthrough
961-
case (err == nil) != (condition.Status == metav1.ConditionTrue):
962-
fallthrough
963-
case hadUpdates:
964-
updateStatus = true
965-
}
955+
updateStatus := hadUpdates || condition == nil || condition.ObservedGeneration != ra.Generation
956+
updateStatus = updateStatus || err != nil
957+
966958
if !updateStatus {
967959
return nil
968960
}

go-controller/pkg/clustermanager/routeadvertisements/controller_test.go

Lines changed: 11 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ type testRA struct {
4747
SelectsDefault bool
4848
AdvertisePods bool
4949
AdvertiseEgressIPs bool
50-
Status *metav1.ConditionStatus
5150
}
5251

5352
func (tra testRA) RouteAdvertisements() *ratypes.RouteAdvertisements {
@@ -93,9 +92,6 @@ func (tra testRA) RouteAdvertisements() *ratypes.RouteAdvertisements {
9392
MatchLabels: tra.FRRConfigurationSelector,
9493
}
9594
}
96-
if tra.Status != nil {
97-
ra.Status.Conditions = []metav1.Condition{{Type: "Accepted", Status: *tra.Status}}
98-
}
9995
return ra
10096
}
10197

@@ -780,38 +776,6 @@ func TestController_reconcile(t *testing.T) {
780776
},
781777
expectNADAnnotations: map[string]map[string]string{"default": {types.OvnRouteAdvertisementsKey: "[\"ra\"]"}, "red": {types.OvnRouteAdvertisementsKey: "[\"ra\"]"}},
782778
},
783-
{
784-
name: "reconciles RouteAdvertisements status even when no other updates are required",
785-
ra: &testRA{Name: "ra", AdvertisePods: true, AdvertiseEgressIPs: true, SelectsDefault: true, Status: ptr.To(metav1.ConditionFalse)},
786-
frrConfigs: []*testFRRConfig{
787-
{
788-
Name: "frrConfig",
789-
Namespace: frrNamespace,
790-
Routers: []*testRouter{
791-
{ASN: 1, Prefixes: []string{"1.1.1.0/24"}, Neighbors: []*testNeighbor{
792-
{ASN: 1, Address: "1.0.0.100"},
793-
}},
794-
},
795-
},
796-
{
797-
Labels: map[string]string{types.OvnRouteAdvertisementsKey: "ra"},
798-
Annotations: map[string]string{types.OvnRouteAdvertisementsKey: "ra/frrConfig/node"},
799-
NodeSelector: map[string]string{"kubernetes.io/hostname": "node"},
800-
Routers: []*testRouter{
801-
{ASN: 1, Prefixes: []string{"1.0.1.1/32", "1.1.0.0/24"}, Neighbors: []*testNeighbor{
802-
{ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.0.1.1/32", "1.1.0.0/24"}, Receive: []string{"1.1.0.0/16/24"}},
803-
}},
804-
},
805-
},
806-
},
807-
nads: []*testNAD{
808-
{Name: "default", Namespace: "ovn-kubernetes", Network: "default", Annotations: map[string]string{types.OvnRouteAdvertisementsKey: "[\"ra\"]"}},
809-
},
810-
nodes: []*testNode{{Name: "node", SubnetsAnnotation: "{\"default\":\"1.1.0.0/24\"}"}},
811-
eips: []*testEIP{{Name: "eip", EIPs: map[string]string{"node": "1.0.1.1"}}},
812-
reconcile: "ra",
813-
expectAcceptedStatus: metav1.ConditionTrue,
814-
},
815779
{
816780
name: "fails to reconcile a secondary network",
817781
ra: &testRA{Name: "ra", AdvertisePods: true, NetworkSelector: map[string]string{"selected": "true"}},
@@ -1041,6 +1005,11 @@ func TestController_reconcile(t *testing.T) {
10411005

10421006
c := NewController(nm.Interface(), wf, fakeClientset)
10431007

1008+
// prime the default network NAD
1009+
if defaultNAD == nil {
1010+
defaultNAD, err = c.getOrCreateDefaultNetworkNAD()
1011+
g.Expect(err).ToNot(gomega.HaveOccurred())
1012+
}
10441013
// prime the default network NAD namespace
10451014
namespace := &corev1.Namespace{
10461015
ObjectMeta: metav1.ObjectMeta{
@@ -1049,15 +1018,11 @@ func TestController_reconcile(t *testing.T) {
10491018
}
10501019
_, err = fakeClientset.KubeClient.CoreV1().Namespaces().Create(context.Background(), namespace, metav1.CreateOptions{})
10511020
g.Expect(err).ToNot(gomega.HaveOccurred())
1052-
// prime the default network NAD
1053-
if defaultNAD == nil {
1054-
defaultNAD, err = c.getOrCreateDefaultNetworkNAD()
1055-
g.Expect(err).ToNot(gomega.HaveOccurred())
1056-
// update it with the annotation that network manager would set
1057-
defaultNAD.Annotations = map[string]string{types.OvnNetworkNameAnnotation: types.DefaultNetworkName}
1058-
_, err = fakeClientset.NetworkAttchDefClient.K8sCniCncfIoV1().NetworkAttachmentDefinitions(defaultNAD.Namespace).Update(context.Background(), defaultNAD, metav1.UpdateOptions{})
1059-
g.Expect(err).ToNot(gomega.HaveOccurred())
1060-
}
1021+
1022+
// update it with the annotation that network manager would set
1023+
defaultNAD.Annotations = map[string]string{types.OvnNetworkNameAnnotation: types.DefaultNetworkName}
1024+
_, err = fakeClientset.NetworkAttchDefClient.K8sCniCncfIoV1().NetworkAttachmentDefinitions(defaultNAD.Namespace).Update(context.Background(), defaultNAD, metav1.UpdateOptions{})
1025+
g.Expect(err).ToNot(gomega.HaveOccurred())
10611026

10621027
err = wf.Start()
10631028
g.Expect(err).ToNot(gomega.HaveOccurred())
@@ -1074,13 +1039,7 @@ func TestController_reconcile(t *testing.T) {
10741039
)
10751040

10761041
err = nm.Start()
1077-
// some test cases start with a bad RA status, avoid asserting
1078-
// initial sync in this case as it will fail
1079-
if tt.ra == nil || tt.ra.Status == nil || *tt.ra.Status == metav1.ConditionTrue {
1080-
g.Expect(err).ToNot(gomega.HaveOccurred())
1081-
} else {
1082-
g.Expect(err).To(gomega.HaveOccurred())
1083-
}
1042+
g.Expect(err).ToNot(gomega.HaveOccurred())
10841043
// we just need the inital sync
10851044
nm.Stop()
10861045

0 commit comments

Comments
 (0)