Skip to content
Draft
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
2 changes: 1 addition & 1 deletion Dockerfile.depend
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
FROM ubuntu:24.04 AS dependencies

ENV GOVERSION=1.26.1
ENV GOVERSION=1.26.2
ENV GOLANGCILINT_VERSION=v2.11.4
ENV MARKDOWNLINT_VERSION=0.48.0

Expand Down
2 changes: 1 addition & 1 deletion calico-vpp-agent/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type LocalNodeSpec struct {
IPv6Address *net.IPNet
}

func NewLocalNodeSpec(msg *proto.HostMetadataV4V6Update) (*LocalNodeSpec, error) {
func NewLocalNodeSpec(msg *proto.HostMetadataUpdate) (*LocalNodeSpec, error) {
localNodeSpec := &LocalNodeSpec{
Name: msg.Hostname,
Labels: msg.Labels,
Expand Down
20 changes: 3 additions & 17 deletions calico-vpp-agent/felix/felix_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,10 +583,6 @@ func (s *Server) handleFelixUpdate(msg interface{}) (err error) {
err = s.handleHostMetadataUpdate(m, pending)
case *proto.HostMetadataRemove:
err = s.handleHostMetadataRemove(m, pending)
case *proto.HostMetadataV4V6Update:
err = s.handleHostMetadataV4V6Update(m, pending)
case *proto.HostMetadataV4V6Remove:
err = s.handleHostMetadataV4V6Remove(m, pending)
case *proto.IPAMPoolUpdate:
err = s.handleIpamPoolUpdate(m, pending)
case *proto.IPAMPoolRemove:
Expand Down Expand Up @@ -1149,16 +1145,6 @@ func (s *Server) handleWorkloadEndpointRemove(msg *proto.WorkloadEndpointRemove,
return nil
}

func (s *Server) handleHostMetadataUpdate(msg *proto.HostMetadataUpdate, pending bool) (err error) {
s.log.Debugf("Ignoring HostMetadataUpdate")
return nil
}

func (s *Server) handleHostMetadataRemove(msg *proto.HostMetadataRemove, pending bool) (err error) {
s.log.Debugf("Ignoring HostMetadataRemove")
return nil
}

func (s *Server) handleWireguardEndpointUpdate(msg *proto.WireguardEndpointUpdate, pending bool) (err error) {
s.log.Infof("Received wireguard public key %+v", msg)
var old *common.NodeWireguardPublicKey
Expand All @@ -1181,10 +1167,10 @@ func (s *Server) handleWireguardEndpointRemove(msg *proto.WireguardEndpointRemov
return nil
}

func (s *Server) handleHostMetadataV4V6Update(msg *proto.HostMetadataV4V6Update, pending bool) (err error) {
func (s *Server) handleHostMetadataUpdate(msg *proto.HostMetadataUpdate, pending bool) (err error) {
localNodeSpec, err := common.NewLocalNodeSpec(msg)
if err != nil {
return errors.Wrapf(err, "handleHostMetadataV4V6Update errored")
return errors.Wrapf(err, "handleHostMetadataUpdate errored")
}
old, found := s.nodeStatesByName[localNodeSpec.Name]

Expand Down Expand Up @@ -1248,7 +1234,7 @@ func (s *Server) handleHostMetadataV4V6Update(msg *proto.HostMetadataV4V6Update,
return nil
}

func (s *Server) handleHostMetadataV4V6Remove(msg *proto.HostMetadataV4V6Remove, pending bool) (err error) {
func (s *Server) handleHostMetadataRemove(msg *proto.HostMetadataRemove, pending bool) (err error) {
old, found := s.nodeStatesByName[msg.Hostname]
if !found {
return fmt.Errorf("node %s to delete not found", msg.Hostname)
Expand Down
8 changes: 4 additions & 4 deletions calico-vpp-agent/felix/felix_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,21 +326,21 @@ var _ = Describe("Felix functionality", func() {
}()
nodeName := "host"
config.NodeName = &nodeName
err := felixServer.handleHostMetadataV4V6Update(&proto.HostMetadataV4V6Update{
err := felixServer.handleHostMetadataUpdate(&proto.HostMetadataUpdate{
Hostname: "host",
Ipv4Addr: "5.5.5.5/32",
Ipv6Addr: "f::f/128",
}, false)
Expect(err).ToNot(HaveOccurred(),
"failed to handle hostMetadataV4V6Update")
"failed to handle HostMetadataUpdate")
expectCnatSnatContain(vpp, []string{"ip4: 5.5.5.5;0", "ip6: f::f;0"}, []string{})

By("receiving a hostmetadatav4v6 remove of own node")
err = felixServer.handleHostMetadataV4V6Remove(&proto.HostMetadataV4V6Remove{
err = felixServer.handleHostMetadataRemove(&proto.HostMetadataRemove{
Hostname: "host",
}, false)
Expect(err).To(Equal(NodeWatcherRestartError{}),
"failed to handle hostMetadataV4V6Remove")
"failed to handle HostMetadataRemove")
})
})
Context("HostEndpoint updates", func() {
Expand Down
4 changes: 0 additions & 4 deletions calico-vpp-agent/felix/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ func (s *Server) RecvMessage(conn net.Conn) (msg interface{}, err error) {
msg = payload.HostMetadataUpdate
case *proto.ToDataplane_HostMetadataRemove:
msg = payload.HostMetadataRemove
case *proto.ToDataplane_HostMetadataV4V6Update:
msg = payload.HostMetadataV4V6Update
case *proto.ToDataplane_HostMetadataV4V6Remove:
msg = payload.HostMetadataV4V6Remove
case *proto.ToDataplane_WireguardEndpointUpdate:
msg = payload.WireguardEndpointUpdate
case *proto.ToDataplane_WireguardEndpointRemove:
Expand Down
4 changes: 4 additions & 0 deletions calico-vpp-agent/tests/mocks/calico/ippools.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func NewIPPoolsStub() *IPPoolsStub {
}
}

func (pools *IPPoolsStub) UpdateStatus(ctx context.Context, res *apiv3.IPPool, opts options.SetOptions) (*apiv3.IPPool, error) {
return nil, nil
}

func (pools *IPPoolsStub) Create(ctx context.Context, res *apiv3.IPPool, opts options.SetOptions) (*apiv3.IPPool, error) {
if res == nil {
return nil, fmt.Errorf("ipPool can't be nil")
Expand Down
44 changes: 22 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/projectcalico/vpp-dataplane/v3

go 1.26.1
go 1.26.2

require (
github.com/calico-vpp/vpplink v0.1.0
github.com/census-instrumentation/opencensus-proto v0.4.1
github.com/containernetworking/plugins v1.9.0
github.com/containernetworking/plugins v1.9.1
github.com/google/gopacket v1.1.19
github.com/inconshreveable/mousetrap v1.1.0
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0
Expand All @@ -14,23 +14,23 @@ require (
github.com/orijtech/prometheus-go-metrics-exporter v0.0.6
github.com/osrg/gobgp/v3 v3.35.0
github.com/pkg/errors v0.9.1
github.com/projectcalico/api v0.0.0-20260421135545-c314aea77bae // v3.32
github.com/projectcalico/calico v0.0.0-20260422095008-f3e5253afd75 // v3.32
github.com/projectcalico/api v0.0.0-20260501222335-e33506a8e856 // v3.33
github.com/projectcalico/calico v0.0.0-20260509141559-00eb290e92c8 // v3.33
github.com/sirupsen/logrus v1.9.4
github.com/spf13/cobra v1.10.2
github.com/vishvananda/netlink v1.3.1
github.com/vishvananda/netns v0.0.5
github.com/yookoala/realpath v1.0.0
go.fd.io/govpp v0.11.0
go.fd.io/govpp/extras v0.1.0
golang.org/x/sys v0.42.0
google.golang.org/grpc v1.79.3
golang.org/x/sys v0.43.0
google.golang.org/grpc v1.80.0
google.golang.org/protobuf v1.36.11
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
k8s.io/api v0.35.4
k8s.io/apimachinery v0.35.4
k8s.io/client-go v0.35.4
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2
sigs.k8s.io/controller-runtime v0.23.3
)

Expand All @@ -52,7 +52,6 @@ require (
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
Expand Down Expand Up @@ -101,46 +100,47 @@ require (
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.etcd.io/etcd/api/v3 v3.6.8 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.6.8 // indirect
go.etcd.io/etcd/client/v3 v3.6.8 // indirect
go.etcd.io/etcd/api/v3 v3.6.10 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.6.10 // indirect
go.etcd.io/etcd/client/v3 v3.6.10 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.49.0 // indirect
golang.org/x/crypto v0.50.0 // indirect
golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 // indirect
golang.org/x/net v0.52.0 // indirect
golang.org/x/net v0.53.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/term v0.41.0 // indirect
golang.org/x/text v0.35.0 // indirect
golang.org/x/term v0.42.0 // indirect
golang.org/x/text v0.36.0 // indirect
golang.org/x/time v0.15.0 // indirect
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20241231184526-a9ab2273dd10 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260311181403-84a4fc48630c // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/go-playground/validator.v9 v9.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.35.4 // indirect
k8s.io/apiserver v0.35.4 // indirect
k8s.io/component-base v0.35.4 // indirect
k8s.io/klog/v2 v2.140.0 // indirect
k8s.io/kube-openapi v0.31.0 // indirect
kubevirt.io/api v1.8.0-rc.0 // indirect
kubevirt.io/api v1.8.2 // indirect
kubevirt.io/client-go v1.8.0-alpha.0 // indirect
kubevirt.io/containerized-data-importer-api v1.64.0 // indirect
kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/network-policy-api v0.2.0 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.4.0 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)

Expand All @@ -166,8 +166,8 @@ require (
// - Run `go mod tidy

replace (
github.com/projectcalico/calico/lib/httpmachinery => github.com/projectcalico/calico/lib/httpmachinery v0.0.0-20260407032530-9d002f03266c // master
github.com/projectcalico/calico/lib/std => github.com/projectcalico/calico/lib/std v0.0.0-20260407032530-9d002f03266c // master
github.com/projectcalico/calico/lib/httpmachinery => github.com/projectcalico/calico/lib/httpmachinery v0.0.0-20260509141559-00eb290e92c8 // master
github.com/projectcalico/calico/lib/std => github.com/projectcalico/calico/lib/std v0.0.0-20260509141559-00eb290e92c8 // master

// Newer versions set the file mode on logs to 0600, which breaks a lot of our tests.
gopkg.in/natefinch/lumberjack.v2 => gopkg.in/natefinch/lumberjack.v2 v2.0.0
Expand Down
Loading
Loading