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
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
merge_group:
pull_request:
branches: [ master ]
# Only run jobs if at least one non-doc file is changed
paths-ignore:
- '**/*.md'
- 'mkdocs.yml'
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
Expand Down
23 changes: 23 additions & 0 deletions contrib/kind-common
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,30 @@ install_kubevirt() {

local kubevirt_stable_release_url=$(get_kubevirt_release_url "stable")
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":{}}}}]'

if [ ! -d "./bin" ]
then
mkdir -p ./bin
if_error_exit "Failed to create bin dir!"
fi

if [[ "$OSTYPE" == "linux-gnu" ]]; then
OS_TYPE="linux"
elif [[ "$OSTYPE" == "darwin"* ]]; then
OS_TYPE="darwin"
fi

pushd ./bin
if [ ! -f ./virtctl ]; then
kubevirt_stable_release_url=$(get_kubevirt_release_url "stable")
cli_name="virtctl-${kubevirt_stable_release_url##*/}-${OS_TYPE}-${ARCH}"
curl -LO "${kubevirt_stable_release_url}/${cli_name}"
mv ${cli_name} virtctl
if_error_exit "Failed to download virtctl!"
fi
popd

chmod +x ./bin/virtctl
}

install_cert_manager() {
Expand Down
10 changes: 5 additions & 5 deletions dist/images/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ARG OVN_FROM=koji
#############################################
# Stage to get OVN and OVS RPMs from source #
#############################################
FROM quay.io/fedora/fedora:42 AS ovnbuilder
FROM quay.io/fedora/fedora:41 AS ovnbuilder

USER root

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

USER root

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

####################################
# Stage to copy OVN RPMs from koji #
####################################
FROM quay.io/fedora/fedora:42 AS koji
FROM quay.io/fedora/fedora:41 AS koji

COPY --from=kojidownloader /*.rpm /

Expand Down
7 changes: 0 additions & 7 deletions dist/images/ovnkube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2097,12 +2097,6 @@ ovnkube-controller-with-node() {
ovn_stateless_netpol_enable_flag="--enable-stateless-netpol"
fi

ovn_disable_requestedchassis_flag=
if [[ ${ovn_disable_requestedchassis} == "true" ]]; then
ovn_disable_requestedchassis_flag="--disable-requestedchassis"
fi
echo "ovn_disable_requestedchassis_flag=${ovn_disable_requestedchassis_flag}"

echo "=============== ovnkube-controller-with-node --init-ovnkube-controller-with-node=========="
/usr/bin/ovnkube --init-ovnkube-controller ${K8S_NODE} --init-node ${K8S_NODE} \
${anp_enabled_flag} \
Expand Down Expand Up @@ -2156,7 +2150,6 @@ ovnkube-controller-with-node() {
${ssl_opts} \
${network_qos_enabled_flag} \
${ovn_enable_dnsnameresolver_flag} \
${ovn_disable_requestedchassis_flag} \
--cluster-subnets ${net_cidr} --k8s-service-cidr=${svc_cidr} \
--export-ovs-metrics \
--gateway-mode=${ovn_gateway_mode} ${ovn_gateway_opts} \
Expand Down
4 changes: 1 addition & 3 deletions dist/templates/ovn-setup.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ spec:
networkSelectors:
- networkSelectionType: DefaultNetwork
nodeSelector: {}
frrConfigurationSelector:
matchLabels:
name: receive-all
frrConfigurationSelector: {}
advertisements:
- "PodNetwork"
{%- endif %}
4 changes: 0 additions & 4 deletions go-controller/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ linters-settings:
# Other frequently used deps
- pkg: github.com/ovn-kubernetes/libovsdb/ovsdb
alias: ""
- pkg: github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/util
alias: nodeutil
- pkg: github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/types
alias: nodetypes

revive:
rules:
Expand Down
10 changes: 5 additions & 5 deletions go-controller/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.0
github.com/k8snetworkplumbingwg/govdpa v0.1.5-0.20230926073613-07c1031aea47
github.com/k8snetworkplumbingwg/ipamclaims v0.5.0-alpha
github.com/k8snetworkplumbingwg/ipamclaims v0.4.0-alpha
github.com/k8snetworkplumbingwg/multi-networkpolicy v1.0.1
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.6.0
github.com/k8snetworkplumbingwg/sriovnet v1.2.1-0.20230427090635-4929697df2dc
Expand Down Expand Up @@ -57,9 +57,9 @@ require (
gopkg.in/fsnotify/fsnotify.v1 v1.4.7
gopkg.in/gcfg.v1 v1.2.3
gopkg.in/natefinch/lumberjack.v2 v2.2.1
k8s.io/api v0.32.5
k8s.io/apimachinery v0.32.5
k8s.io/client-go v0.32.5
k8s.io/api v0.32.3
k8s.io/apimachinery v0.32.3
k8s.io/client-go v0.32.3
k8s.io/component-helpers v0.32.3
k8s.io/klog/v2 v2.130.1
k8s.io/kubernetes v1.32.6
Expand Down Expand Up @@ -125,7 +125,7 @@ require (
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/oauth2 v0.27.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/tools v0.26.0 // indirect
Expand Down
20 changes: 10 additions & 10 deletions go-controller/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,8 @@ github.com/juju/version v0.0.0-20161031051906-1f41e27e54f2/go.mod h1:kE8gK5X0CIm
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/k8snetworkplumbingwg/govdpa v0.1.5-0.20230926073613-07c1031aea47 h1:iSncnlC+rtlNOIpPa3fbqQMhpTscGJIlkiWaPl1VcS4=
github.com/k8snetworkplumbingwg/govdpa v0.1.5-0.20230926073613-07c1031aea47/go.mod h1:SPaDIyUmwN03Bgn0u/mhoiE4o/+koeKh11VUsdsUX0U=
github.com/k8snetworkplumbingwg/ipamclaims v0.5.0-alpha h1:b3iHeks/KTzhG2dNanaUZcFEJwJbYBZY16jxCaVv9i8=
github.com/k8snetworkplumbingwg/ipamclaims v0.5.0-alpha/go.mod h1:MGaMX1tJ7MlHDee4/xmqp3guQh+eDiuCLAauqD9K11Q=
github.com/k8snetworkplumbingwg/ipamclaims v0.4.0-alpha h1:ss+EP77GlQmh90hGKpnAG4Q3VVxRlB7GoncemaPtO4g=
github.com/k8snetworkplumbingwg/ipamclaims v0.4.0-alpha/go.mod h1:qlR+sKxQ2OGfwhFCuXSd7rJ/GgC38vQBeHKQ7f2YnpI=
github.com/k8snetworkplumbingwg/multi-networkpolicy v1.0.1 h1:Egj1hEVYNXWFlKpgzAXxe/2o8VNiVcAJLrKzlinILQo=
github.com/k8snetworkplumbingwg/multi-networkpolicy v1.0.1/go.mod h1:kEJ4WM849yNmXekuSXLRwb+LaZ9usC06O8JgoAIq+f4=
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.6.0 h1:BT3ghAY0q7lWib9rz+tVXDFkm27dJV6SLCn7TunZwo4=
Expand Down Expand Up @@ -945,8 +945,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -1317,26 +1317,26 @@ k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ=
k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8=
k8s.io/api v0.22.7/go.mod h1:7hejA1BgBEiSsWljUyRkIjj+AISXO16IwsaDgFjJsQE=
k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ=
k8s.io/api v0.32.5 h1:uqjjsYo1kTJr5NIcoIaP9F+TgXgADH7nKQx91FDAhtk=
k8s.io/api v0.32.5/go.mod h1:bXXFU3fGCZ/eFMZvfHZC69PeGbXEL4zzjuPVzOxHF64=
k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls=
k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k=
k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY=
k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss=
k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc=
k8s.io/apimachinery v0.22.7/go.mod h1:ZvVLP5iLhwVFg2Yx9Gh5W0um0DUauExbRhe+2Z8I1EU=
k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM=
k8s.io/apimachinery v0.32.5 h1:6We3aJ6crC0ap8EhsEXcgX3LpI6SEjubpiOMXLROwPM=
k8s.io/apimachinery v0.32.5/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U=
k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU=
k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM=
k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q=
k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y=
k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k=
k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0=
k8s.io/client-go v0.22.7/go.mod h1:pGU/tWSzzvsYT7M3npHhoZ3Jh9qJTTIvFvDtWuW31dw=
k8s.io/client-go v0.32.5 h1:huFmQMzgWu0z4kbWsuZci+Gt4Fo72I4CcrvhToZ/Qp0=
k8s.io/client-go v0.32.5/go.mod h1:Qchw6f9WIVrur7DKojAHpRgGLcANT0RLIvF39Jz58xA=
k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU=
k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY=
k8s.io/code-generator v0.22.7/go.mod h1:iOZwYADSgFPNGWfqHFfg1V0TNJnl1t0WyZluQp4baqU=
k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk=
k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk=
Expand Down
14 changes: 3 additions & 11 deletions go-controller/pkg/clustermanager/routeadvertisements/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -951,18 +951,10 @@ func (c *Controller) updateRAStatus(ra *ratypes.RouteAdvertisements, hadUpdates
return nil
}

var updateStatus bool
condition := meta.FindStatusCondition(ra.Status.Conditions, "Accepted")
switch {
case condition == nil:
fallthrough
case condition.ObservedGeneration != ra.Generation:
fallthrough
case (err == nil) != (condition.Status == metav1.ConditionTrue):
fallthrough
case hadUpdates:
updateStatus = true
}
updateStatus := hadUpdates || condition == nil || condition.ObservedGeneration != ra.Generation
updateStatus = updateStatus || err != nil

if !updateStatus {
return nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ type testRA struct {
SelectsDefault bool
AdvertisePods bool
AdvertiseEgressIPs bool
Status *metav1.ConditionStatus
}

func (tra testRA) RouteAdvertisements() *ratypes.RouteAdvertisements {
Expand Down Expand Up @@ -93,9 +92,6 @@ func (tra testRA) RouteAdvertisements() *ratypes.RouteAdvertisements {
MatchLabels: tra.FRRConfigurationSelector,
}
}
if tra.Status != nil {
ra.Status.Conditions = []metav1.Condition{{Type: "Accepted", Status: *tra.Status}}
}
return ra
}

Expand Down Expand Up @@ -780,38 +776,6 @@ func TestController_reconcile(t *testing.T) {
},
expectNADAnnotations: map[string]map[string]string{"default": {types.OvnRouteAdvertisementsKey: "[\"ra\"]"}, "red": {types.OvnRouteAdvertisementsKey: "[\"ra\"]"}},
},
{
name: "reconciles RouteAdvertisements status even when no other updates are required",
ra: &testRA{Name: "ra", AdvertisePods: true, AdvertiseEgressIPs: true, SelectsDefault: true, Status: ptr.To(metav1.ConditionFalse)},
frrConfigs: []*testFRRConfig{
{
Name: "frrConfig",
Namespace: frrNamespace,
Routers: []*testRouter{
{ASN: 1, Prefixes: []string{"1.1.1.0/24"}, Neighbors: []*testNeighbor{
{ASN: 1, Address: "1.0.0.100"},
}},
},
},
{
Labels: map[string]string{types.OvnRouteAdvertisementsKey: "ra"},
Annotations: map[string]string{types.OvnRouteAdvertisementsKey: "ra/frrConfig/node"},
NodeSelector: map[string]string{"kubernetes.io/hostname": "node"},
Routers: []*testRouter{
{ASN: 1, Prefixes: []string{"1.0.1.1/32", "1.1.0.0/24"}, Neighbors: []*testNeighbor{
{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"}},
}},
},
},
},
nads: []*testNAD{
{Name: "default", Namespace: "ovn-kubernetes", Network: "default", Annotations: map[string]string{types.OvnRouteAdvertisementsKey: "[\"ra\"]"}},
},
nodes: []*testNode{{Name: "node", SubnetsAnnotation: "{\"default\":\"1.1.0.0/24\"}"}},
eips: []*testEIP{{Name: "eip", EIPs: map[string]string{"node": "1.0.1.1"}}},
reconcile: "ra",
expectAcceptedStatus: metav1.ConditionTrue,
},
{
name: "fails to reconcile a secondary network",
ra: &testRA{Name: "ra", AdvertisePods: true, NetworkSelector: map[string]string{"selected": "true"}},
Expand Down Expand Up @@ -1041,6 +1005,11 @@ func TestController_reconcile(t *testing.T) {

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

// prime the default network NAD
if defaultNAD == nil {
defaultNAD, err = c.getOrCreateDefaultNetworkNAD()
g.Expect(err).ToNot(gomega.HaveOccurred())
}
// prime the default network NAD namespace
namespace := &corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -1049,15 +1018,11 @@ func TestController_reconcile(t *testing.T) {
}
_, err = fakeClientset.KubeClient.CoreV1().Namespaces().Create(context.Background(), namespace, metav1.CreateOptions{})
g.Expect(err).ToNot(gomega.HaveOccurred())
// prime the default network NAD
if defaultNAD == nil {
defaultNAD, err = c.getOrCreateDefaultNetworkNAD()
g.Expect(err).ToNot(gomega.HaveOccurred())
// update it with the annotation that network manager would set
defaultNAD.Annotations = map[string]string{types.OvnNetworkNameAnnotation: types.DefaultNetworkName}
_, err = fakeClientset.NetworkAttchDefClient.K8sCniCncfIoV1().NetworkAttachmentDefinitions(defaultNAD.Namespace).Update(context.Background(), defaultNAD, metav1.UpdateOptions{})
g.Expect(err).ToNot(gomega.HaveOccurred())
}

// update it with the annotation that network manager would set
defaultNAD.Annotations = map[string]string{types.OvnNetworkNameAnnotation: types.DefaultNetworkName}
_, err = fakeClientset.NetworkAttchDefClient.K8sCniCncfIoV1().NetworkAttachmentDefinitions(defaultNAD.Namespace).Update(context.Background(), defaultNAD, metav1.UpdateOptions{})
g.Expect(err).ToNot(gomega.HaveOccurred())

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

err = nm.Start()
// some test cases start with a bad RA status, avoid asserting
// initial sync in this case as it will fail
if tt.ra == nil || tt.ra.Status == nil || *tt.ra.Status == metav1.ConditionTrue {
g.Expect(err).ToNot(gomega.HaveOccurred())
} else {
g.Expect(err).To(gomega.HaveOccurred())
}
g.Expect(err).ToNot(gomega.HaveOccurred())
// we just need the inital sync
nm.Stop()

Expand Down
Loading