Use local version of cri packages
Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
@@ -26,7 +26,7 @@ import (
|
||||
"k8s.io/client-go/tools/remotecommand"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
)
|
||||
|
||||
// Attach prepares a streaming endpoint to attach to a running container, and returns the address.
|
||||
|
||||
@@ -33,16 +33,16 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
func init() {
|
||||
typeurl.Register(&containerstore.Metadata{},
|
||||
"github.com/containerd/cri/pkg/store/container", "Metadata")
|
||||
"github.com/containerd/containerd/pkg/store/container", "Metadata")
|
||||
}
|
||||
|
||||
// CreateContainer creates a new container in the given PodSandbox.
|
||||
|
||||
@@ -34,9 +34,9 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -40,12 +40,12 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/cri/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
ostesting "github.com/containerd/cri/pkg/os/testing"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
ostesting "github.com/containerd/containerd/pkg/os/testing"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
func getCreateContainerTestData() (*runtime.ContainerConfig, *runtime.PodSandboxConfig,
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
)
|
||||
|
||||
// containerMounts sets up necessary container system file mounts
|
||||
|
||||
@@ -28,9 +28,9 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/cri/pkg/constants"
|
||||
"github.com/containerd/cri/pkg/containerd/opts"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/constants"
|
||||
"github.com/containerd/containerd/pkg/containerd/opts"
|
||||
)
|
||||
|
||||
func checkMount(t *testing.T, mounts []runtimespec.Mount, src, dest, typ string,
|
||||
|
||||
@@ -24,9 +24,9 @@ import (
|
||||
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
)
|
||||
|
||||
// No container mounts for windows.
|
||||
|
||||
@@ -26,8 +26,8 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
)
|
||||
|
||||
func getCreateContainerTestData() (*runtime.ContainerConfig, *runtime.PodSandboxConfig,
|
||||
|
||||
@@ -32,10 +32,10 @@ import (
|
||||
"k8s.io/client-go/tools/remotecommand"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
// ExecSync executes a command in the container, and returns the stdout output.
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// ListContainers lists all containers matching the filter.
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func TestToCRIContainer(t *testing.T) {
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// RemoveContainer removes the container.
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// TestSetContainerRemoving tests setContainerRemoving sets removing
|
||||
|
||||
@@ -31,11 +31,11 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// StartContainer starts the container.
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// TestSetContainerStarting tests setContainerStarting sets removing
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// ListContainerStats returns stats of all running containers.
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
func (c *criService) containerMetrics(
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
func (c *criService) containerMetrics(
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
func (c *criService) containerMetrics(
|
||||
|
||||
@@ -24,8 +24,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// ContainerStatus inspects the container and returns the status.
|
||||
|
||||
@@ -24,8 +24,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
)
|
||||
|
||||
func getContainerStatusTestData() (*containerstore.Metadata, *containerstore.Status,
|
||||
|
||||
@@ -28,9 +28,9 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// StopContainer stops a running container with a grace period (i.e., timeout).
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
func TestWaitContainerStop(t *testing.T) {
|
||||
|
||||
@@ -29,10 +29,10 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
"github.com/containerd/containerd/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
// UpdateContainerResources updates ContainerConfig of the container.
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// UpdateContainerResources updates ContainerConfig of the container.
|
||||
|
||||
@@ -32,11 +32,11 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
"k8s.io/apimachinery/pkg/util/clock"
|
||||
|
||||
"github.com/containerd/cri/pkg/constants"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
"github.com/containerd/containerd/pkg/constants"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -37,12 +37,12 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
runtimeoptions "github.com/containerd/cri/pkg/api/runtimeoptions/v1"
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
runtimeoptions "github.com/containerd/containerd/pkg/api/runtimeoptions/v1"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -30,8 +30,8 @@ import (
|
||||
|
||||
"github.com/containerd/containerd/log"
|
||||
"github.com/containerd/containerd/mount"
|
||||
"github.com/containerd/cri/pkg/seccomp"
|
||||
"github.com/containerd/cri/pkg/seutil"
|
||||
"github.com/containerd/containerd/pkg/seccomp"
|
||||
"github.com/containerd/containerd/pkg/seutil"
|
||||
runcapparmor "github.com/opencontainers/runc/libcontainer/apparmor"
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/opencontainers/selinux/go-selinux/label"
|
||||
|
||||
@@ -32,9 +32,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
)
|
||||
|
||||
// TestGetUserFromImage tests the logic of getting image uid or user name of image user.
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
)
|
||||
|
||||
func TestListImages(t *testing.T) {
|
||||
|
||||
@@ -42,7 +42,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
)
|
||||
|
||||
// For image management:
|
||||
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
)
|
||||
|
||||
func TestParseAuth(t *testing.T) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
)
|
||||
|
||||
// RemoveImage removes the image.
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
)
|
||||
|
||||
// ImageStatus returns the status of the image, returns nil if the image isn't present.
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
)
|
||||
|
||||
func TestImageStatus(t *testing.T) {
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
snapshotstore "github.com/containerd/cri/pkg/store/snapshot"
|
||||
snapshotstore "github.com/containerd/containerd/pkg/store/snapshot"
|
||||
)
|
||||
|
||||
func TestImageFsInfo(t *testing.T) {
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
)
|
||||
|
||||
// instrumentedService wraps service with containerd namespace and logs.
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"github.com/containerd/containerd/cio"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
// streamKey generates a key for the stream.
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/containerd/containerd/cio"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
)
|
||||
|
||||
// ExecIO holds the exec io.
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
)
|
||||
|
||||
func TestRedirectLogs(t *testing.T) {
|
||||
|
||||
@@ -34,11 +34,11 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
"github.com/containerd/cri/pkg/netns"
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
"github.com/containerd/containerd/pkg/netns"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// NOTE: The recovery logic has following assumption: when the cri plugin is down:
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// ListPodSandbox returns a list of Sandbox.
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func TestToCRISandbox(t *testing.T) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address.
|
||||
|
||||
@@ -27,8 +27,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
"k8s.io/utils/exec"
|
||||
|
||||
"github.com/containerd/cri/pkg/ioutil"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
"github.com/containerd/containerd/pkg/ioutil"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriter) error {
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// RemovePodSandbox removes the sandbox. If there are running containers in the
|
||||
|
||||
@@ -36,20 +36,20 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
"github.com/containerd/cri/pkg/netns"
|
||||
"github.com/containerd/cri/pkg/server/bandwidth"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
"github.com/containerd/containerd/pkg/netns"
|
||||
"github.com/containerd/containerd/pkg/server/bandwidth"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
selinux "github.com/opencontainers/selinux/go-selinux"
|
||||
)
|
||||
|
||||
func init() {
|
||||
typeurl.Register(&sandboxstore.Metadata{},
|
||||
"github.com/containerd/cri/pkg/store/sandbox", "Metadata")
|
||||
"github.com/containerd/containerd/pkg/store/sandbox", "Metadata")
|
||||
}
|
||||
|
||||
// RunPodSandbox creates and starts a pod-level sandbox. Runtimes should ensure
|
||||
|
||||
@@ -31,9 +31,9 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
osinterface "github.com/containerd/cri/pkg/os"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
osinterface "github.com/containerd/containerd/pkg/os"
|
||||
)
|
||||
|
||||
func (c *criService) sandboxContainerSpec(id string, config *runtime.PodSandboxConfig,
|
||||
|
||||
@@ -28,9 +28,9 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/containerd/opts"
|
||||
ostesting "github.com/containerd/cri/pkg/os/testing"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/containerd/opts"
|
||||
ostesting "github.com/containerd/containerd/pkg/os/testing"
|
||||
)
|
||||
|
||||
func getRunPodSandboxTestData() (*runtime.PodSandboxConfig, *imagespec.ImageConfig, func(*testing.T, string, *runtimespec.Spec)) {
|
||||
|
||||
@@ -27,9 +27,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func TestSandboxContainerSpec(t *testing.T) {
|
||||
|
||||
@@ -26,8 +26,8 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
)
|
||||
|
||||
func (c *criService) sandboxContainerSpec(id string, config *runtime.PodSandboxConfig,
|
||||
|
||||
@@ -26,8 +26,8 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/containerd/opts"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/containerd/opts"
|
||||
)
|
||||
|
||||
func getRunPodSandboxTestData() (*runtime.PodSandboxConfig, *imagespec.ImageConfig, func(*testing.T, string, *runtimespec.Spec)) {
|
||||
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// PodSandboxStatus returns the status of the PodSandbox.
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func TestPodSandboxStatus(t *testing.T) {
|
||||
|
||||
@@ -27,8 +27,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// StopPodSandbox stops the sandbox. If there are any running containers in the
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func TestWaitSandboxStop(t *testing.T) {
|
||||
|
||||
@@ -27,25 +27,25 @@ import (
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/oci"
|
||||
"github.com/containerd/containerd/pkg/streaming"
|
||||
"github.com/containerd/containerd/plugin"
|
||||
"github.com/containerd/cri/pkg/streaming"
|
||||
cni "github.com/containerd/go-cni"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store/label"
|
||||
"github.com/containerd/containerd/pkg/store/label"
|
||||
|
||||
"github.com/containerd/cri/pkg/atomic"
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
osinterface "github.com/containerd/cri/pkg/os"
|
||||
"github.com/containerd/cri/pkg/registrar"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
snapshotstore "github.com/containerd/cri/pkg/store/snapshot"
|
||||
"github.com/containerd/containerd/pkg/atomic"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
osinterface "github.com/containerd/containerd/pkg/os"
|
||||
"github.com/containerd/containerd/pkg/registrar"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
snapshotstore "github.com/containerd/containerd/pkg/store/snapshot"
|
||||
)
|
||||
|
||||
// grpcServices are all the grpc services provided by cri containerd.
|
||||
|
||||
@@ -26,15 +26,15 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
ostesting "github.com/containerd/cri/pkg/os/testing"
|
||||
"github.com/containerd/cri/pkg/registrar"
|
||||
servertesting "github.com/containerd/cri/pkg/server/testing"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
"github.com/containerd/cri/pkg/store/label"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
snapshotstore "github.com/containerd/cri/pkg/store/snapshot"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
ostesting "github.com/containerd/containerd/pkg/os/testing"
|
||||
"github.com/containerd/containerd/pkg/registrar"
|
||||
servertesting "github.com/containerd/containerd/pkg/server/testing"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
"github.com/containerd/containerd/pkg/store/label"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
snapshotstore "github.com/containerd/containerd/pkg/store/snapshot"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
snapshotstore "github.com/containerd/cri/pkg/store/snapshot"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
snapshotstore "github.com/containerd/containerd/pkg/store/snapshot"
|
||||
)
|
||||
|
||||
// snapshotsSyncer syncs snapshot stats periodically. imagefs info and container stats
|
||||
|
||||
@@ -32,8 +32,8 @@ import (
|
||||
k8scert "k8s.io/client-go/util/cert"
|
||||
"k8s.io/utils/exec"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
"github.com/containerd/cri/pkg/streaming"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
"github.com/containerd/containerd/pkg/streaming"
|
||||
)
|
||||
|
||||
type streamListenerMode int
|
||||
|
||||
@@ -19,7 +19,7 @@ package server
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
servertesting "github.com/containerd/cri/pkg/server/testing"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
servertesting "github.com/containerd/containerd/pkg/server/testing"
|
||||
)
|
||||
|
||||
func TestUpdateRuntimeConfig(t *testing.T) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/constants"
|
||||
"github.com/containerd/containerd/pkg/constants"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user