Move sandbox info to cri types packages
Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
@@ -26,8 +26,8 @@ import (
|
||||
containerd "github.com/containerd/containerd/v2/client"
|
||||
"github.com/containerd/containerd/v2/core/containers"
|
||||
"github.com/containerd/containerd/v2/core/sandbox"
|
||||
"github.com/containerd/containerd/v2/pkg/cri/server/base"
|
||||
"github.com/containerd/containerd/v2/pkg/cri/server/podsandbox/types"
|
||||
critypes "github.com/containerd/containerd/v2/pkg/cri/types"
|
||||
"github.com/containerd/errdefs"
|
||||
)
|
||||
|
||||
@@ -63,7 +63,7 @@ func (c *Controller) Status(ctx context.Context, sandboxID string, verbose bool)
|
||||
|
||||
// toCRISandboxInfo converts internal container object information to CRI sandbox status response info map.
|
||||
func toCRISandboxInfo(ctx context.Context, sb *types.PodSandbox) (map[string]string, error) {
|
||||
si := &base.SandboxInfo{
|
||||
si := &critypes.SandboxInfo{
|
||||
Pid: sb.Pid,
|
||||
Config: sb.Metadata.Config,
|
||||
RuntimeHandler: sb.Metadata.RuntimeHandler,
|
||||
|
||||
@@ -24,8 +24,8 @@ import (
|
||||
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
|
||||
"github.com/containerd/containerd/v2/pkg/cri/server/base"
|
||||
sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox"
|
||||
"github.com/containerd/containerd/v2/pkg/cri/types"
|
||||
"github.com/containerd/errdefs"
|
||||
)
|
||||
|
||||
@@ -152,7 +152,7 @@ func toCRISandboxStatus(meta sandboxstore.Metadata, status string, createdAt tim
|
||||
// but if controller.Status() returns a NotFound error,
|
||||
// we should fallback to get SandboxInfo from cached sandbox itself.
|
||||
func toDeletedCRISandboxInfo(sandbox sandboxstore.Sandbox) (map[string]string, error) {
|
||||
si := &base.SandboxInfo{
|
||||
si := &types.SandboxInfo{
|
||||
Pid: sandbox.Status.Get().Pid,
|
||||
Config: sandbox.Config,
|
||||
RuntimeHandler: sandbox.RuntimeHandler,
|
||||
|
||||
Reference in New Issue
Block a user