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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/containerd/containerd v1.7.21
github.com/containerd/containerd/api v1.7.19
github.com/containerd/fifo v1.1.0
github.com/containerd/nri v0.7.0
github.com/containerd/nri v0.8.0
github.com/containerd/otelttrpc v0.0.0-20240305015340-ea5083fda723
github.com/containerd/ttrpc v1.2.6-0.20240827082320-b5cd6e4b3287
github.com/containerd/typeurl v1.0.3-0.20220422153119-7f6e6d160d67
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,8 @@ github.com/containerd/go-runc v1.1.0 h1:OX4f+/i2y5sUT7LhmcJH7GYrjjhHa1QI4e8yO0gG
github.com/containerd/go-runc v1.1.0/go.mod h1:xJv2hFF7GvHtTJd9JqTS2UVxMkULUYw4JN5XAUZqH5U=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/containerd/nri v0.7.0 h1:scGL9JiBqNaWnghLFFPOzp0GxxWAc1uQtQ7qx8PHdCs=
github.com/containerd/nri v0.7.0/go.mod h1:uSkgBrCdEtAiEz4vnrq8gmAC4EnVAM5Klt0OuK5rZYQ=
github.com/containerd/nri v0.8.0 h1:n1S753B9lX8RFrHYeSgwVvS1yaUcHjxbB+f+xzEncRI=
github.com/containerd/nri v0.8.0/go.mod h1:uSkgBrCdEtAiEz4vnrq8gmAC4EnVAM5Klt0OuK5rZYQ=
github.com/containerd/otelttrpc v0.0.0-20240305015340-ea5083fda723 h1:swk9KxrmARZjSMrHc1Lzb39XhcDwAhYpqkBhinCFLCQ=
github.com/containerd/otelttrpc v0.0.0-20240305015340-ea5083fda723/go.mod h1:ZKzztepTSz/LKtbUSzfBNVwgqBEPABVZV9PQF/l53+Q=
github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU=
Expand Down
6 changes: 6 additions & 0 deletions internal/lib/sandbox/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@
return s.ips
}

// GetIPs returns the ip of the sandbox.
// Wrap the IPs() method to match the NRI interface.
func (s *Sandbox) GetIPs() []string {
return s.IPs()

Check warning on line 180 in internal/lib/sandbox/sandbox.go

View check run for this annotation

Codecov / codecov/patch

internal/lib/sandbox/sandbox.go#L179-L180

Added lines #L179 - L180 were not covered by tests
}

// ID returns the id of the sandbox.
func (s *Sandbox) ID() string {
return s.criSandbox.Id
Expand Down
2 changes: 2 additions & 0 deletions internal/nri/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type PodSandbox interface {
GetLinuxPodSandbox() LinuxPodSandbox

GetPid() uint32
GetIPs() []string
}

type LinuxPodSandbox interface {
Expand All @@ -39,6 +40,7 @@ func commonPodSandboxToNRI(pod PodSandbox) *nri.PodSandbox {
Annotations: pod.GetAnnotations(),
RuntimeHandler: pod.GetRuntimeHandler(),
Pid: pod.GetPid(),
Ips: pod.GetIPs(),
}
}

Expand Down
889 changes: 449 additions & 440 deletions vendor/github.com/containerd/nri/pkg/api/api.pb.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions vendor/github.com/containerd/nri/pkg/api/api.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ github.com/containerd/go-runc
# github.com/containerd/log v0.1.0
## explicit; go 1.20
github.com/containerd/log
# github.com/containerd/nri v0.7.0
# github.com/containerd/nri v0.8.0
## explicit; go 1.21
github.com/containerd/nri/pkg/adaptation
github.com/containerd/nri/pkg/api
Expand Down
Loading