From b22b6273002ed2d44936ed18798e46c5d48eb0c8 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Wed, 7 Oct 2020 13:09:37 -0700 Subject: [PATCH] Move cri server packages under pkg/cri Organizes the cri related server packages under pkg/cri Signed-off-by: Derek McGowan --- integration/main_test.go | 4 ++-- pkg/{ => cri}/config/config.go | 0 pkg/{ => cri}/config/config_test.go | 0 pkg/{ => cri}/config/config_unix.go | 0 pkg/{ => cri}/config/config_windows.go | 0 pkg/cri/cri.go | 4 ++-- pkg/{server => cri}/io/container_io.go | 0 pkg/{server => cri}/io/exec_io.go | 0 pkg/{server => cri}/io/helpers.go | 0 pkg/{server => cri}/io/helpers_unix.go | 0 pkg/{server => cri}/io/helpers_windows.go | 0 pkg/{server => cri}/io/logger.go | 0 pkg/{server => cri}/io/logger_test.go | 0 pkg/{api => cri}/runtimeoptions/v1/api.pb.go | 0 pkg/{api => cri}/runtimeoptions/v1/api.proto | 0 pkg/{ => cri}/server/bandwidth/doc.go | 0 pkg/{ => cri}/server/bandwidth/fake_shaper.go | 0 pkg/{ => cri}/server/bandwidth/interfaces.go | 0 pkg/{ => cri}/server/bandwidth/linux.go | 0 pkg/{ => cri}/server/bandwidth/unsupported.go | 0 pkg/{ => cri}/server/bandwidth/utils.go | 0 pkg/{ => cri}/server/cni_conf_syncer.go | 0 pkg/{ => cri}/server/container_attach.go | 2 +- pkg/{ => cri}/server/container_create.go | 6 +++--- pkg/{ => cri}/server/container_create_linux.go | 2 +- .../server/container_create_linux_test.go | 2 +- pkg/{ => cri}/server/container_create_other.go | 2 +- .../server/container_create_other_test.go | 0 pkg/{ => cri}/server/container_create_test.go | 2 +- pkg/{ => cri}/server/container_create_windows.go | 2 +- .../server/container_create_windows_test.go | 2 +- pkg/{ => cri}/server/container_exec.go | 0 pkg/{ => cri}/server/container_execsync.go | 2 +- pkg/{ => cri}/server/container_list.go | 2 +- pkg/{ => cri}/server/container_list_test.go | 4 ++-- pkg/{ => cri}/server/container_log_reopen.go | 0 pkg/{ => cri}/server/container_remove.go | 4 ++-- pkg/{ => cri}/server/container_remove_test.go | 2 +- pkg/{ => cri}/server/container_start.go | 6 +++--- pkg/{ => cri}/server/container_start_test.go | 2 +- pkg/{ => cri}/server/container_stats.go | 0 pkg/{ => cri}/server/container_stats_list.go | 2 +- pkg/{ => cri}/server/container_stats_list_linux.go | 6 ++---- .../server/container_stats_list_linux_test.go | 0 pkg/{ => cri}/server/container_stats_list_other.go | 2 +- .../server/container_stats_list_windows.go | 2 +- pkg/{ => cri}/server/container_status.go | 4 ++-- pkg/{ => cri}/server/container_status_test.go | 4 ++-- pkg/{ => cri}/server/container_stop.go | 4 ++-- pkg/{ => cri}/server/container_stop_test.go | 2 +- .../server/container_update_resources_linux.go | 2 +- .../container_update_resources_linux_test.go | 0 .../server/container_update_resources_other.go | 2 +- .../server/container_update_resources_windows.go | 0 pkg/{ => cri}/server/events.go | 6 +++--- pkg/{ => cri}/server/events_test.go | 0 pkg/{ => cri}/server/helpers.go | 12 ++++++------ pkg/{ => cri}/server/helpers_linux.go | 0 pkg/{ => cri}/server/helpers_linux_test.go | 0 pkg/{ => cri}/server/helpers_other.go | 0 pkg/{ => cri}/server/helpers_selinux_test.go | 0 pkg/{ => cri}/server/helpers_test.go | 6 +++--- pkg/{ => cri}/server/helpers_windows.go | 0 pkg/{ => cri}/server/image_list.go | 0 pkg/{ => cri}/server/image_list_test.go | 2 +- pkg/{ => cri}/server/image_pull.go | 2 +- pkg/{ => cri}/server/image_pull_test.go | 2 +- pkg/{ => cri}/server/image_remove.go | 2 +- pkg/{ => cri}/server/image_status.go | 4 ++-- pkg/{ => cri}/server/image_status_test.go | 2 +- pkg/{ => cri}/server/imagefs_info.go | 0 pkg/{ => cri}/server/imagefs_info_test.go | 2 +- pkg/{ => cri}/server/instrumented_service.go | 0 pkg/{ => cri}/server/opts.go | 0 pkg/{ => cri}/server/restart.go | 6 +++--- pkg/{ => cri}/server/sandbox_list.go | 2 +- pkg/{ => cri}/server/sandbox_list_test.go | 2 +- pkg/{ => cri}/server/sandbox_portforward.go | 2 +- pkg/{ => cri}/server/sandbox_portforward_linux.go | 0 pkg/{ => cri}/server/sandbox_portforward_other.go | 0 .../server/sandbox_portforward_windows.go | 2 +- pkg/{ => cri}/server/sandbox_remove.go | 4 ++-- pkg/{ => cri}/server/sandbox_run.go | 8 ++++---- pkg/{ => cri}/server/sandbox_run_linux.go | 0 pkg/{ => cri}/server/sandbox_run_linux_test.go | 0 pkg/{ => cri}/server/sandbox_run_other.go | 0 pkg/{ => cri}/server/sandbox_run_other_test.go | 0 pkg/{ => cri}/server/sandbox_run_test.go | 4 ++-- pkg/{ => cri}/server/sandbox_run_windows.go | 0 pkg/{ => cri}/server/sandbox_run_windows_test.go | 0 pkg/{ => cri}/server/sandbox_status.go | 2 +- pkg/{ => cri}/server/sandbox_status_test.go | 2 +- pkg/{ => cri}/server/sandbox_stop.go | 2 +- pkg/{ => cri}/server/sandbox_stop_test.go | 2 +- pkg/{ => cri}/server/service.go | 12 ++++++------ pkg/{ => cri}/server/service_linux.go | 0 pkg/{ => cri}/server/service_other.go | 0 pkg/{ => cri}/server/service_test.go | 14 +++++++------- pkg/{ => cri}/server/service_windows.go | 0 pkg/{ => cri}/server/snapshots.go | 2 +- pkg/{ => cri}/server/status.go | 0 pkg/{ => cri}/server/streaming.go | 0 pkg/{ => cri}/server/streaming_test.go | 2 +- pkg/{ => cri}/server/testing/fake_cni_plugin.go | 0 pkg/{ => cri}/server/update_runtime_config.go | 0 pkg/{ => cri}/server/update_runtime_config_test.go | 4 ++-- pkg/{ => cri}/server/version.go | 0 pkg/{ => cri}/store/container/container.go | 6 +++--- pkg/{ => cri}/store/container/container_test.go | 6 +++--- pkg/{ => cri}/store/container/fake_status.go | 0 pkg/{ => cri}/store/container/metadata.go | 0 pkg/{ => cri}/store/container/metadata_test.go | 0 pkg/{ => cri}/store/container/status.go | 0 pkg/{ => cri}/store/container/status_test.go | 0 pkg/{ => cri}/store/errors.go | 0 pkg/{ => cri}/store/errors_test.go | 0 pkg/{ => cri}/store/image/fake_image.go | 0 pkg/{ => cri}/store/image/image.go | 2 +- pkg/{ => cri}/store/image/image_test.go | 2 +- pkg/{ => cri}/store/label/label.go | 0 pkg/{ => cri}/store/label/label_test.go | 0 pkg/{ => cri}/store/sandbox/metadata.go | 0 pkg/{ => cri}/store/sandbox/metadata_test.go | 0 pkg/{ => cri}/store/sandbox/sandbox.go | 4 ++-- pkg/{ => cri}/store/sandbox/sandbox_test.go | 4 ++-- pkg/{ => cri}/store/sandbox/status.go | 0 pkg/{ => cri}/store/sandbox/status_test.go | 0 pkg/{ => cri}/store/snapshot/snapshot.go | 2 +- pkg/{ => cri}/store/snapshot/snapshot_test.go | 2 +- pkg/{ => cri}/store/util.go | 0 130 files changed, 109 insertions(+), 111 deletions(-) rename pkg/{ => cri}/config/config.go (100%) rename pkg/{ => cri}/config/config_test.go (100%) rename pkg/{ => cri}/config/config_unix.go (100%) rename pkg/{ => cri}/config/config_windows.go (100%) rename pkg/{server => cri}/io/container_io.go (100%) rename pkg/{server => cri}/io/exec_io.go (100%) rename pkg/{server => cri}/io/helpers.go (100%) rename pkg/{server => cri}/io/helpers_unix.go (100%) rename pkg/{server => cri}/io/helpers_windows.go (100%) rename pkg/{server => cri}/io/logger.go (100%) rename pkg/{server => cri}/io/logger_test.go (100%) rename pkg/{api => cri}/runtimeoptions/v1/api.pb.go (100%) rename pkg/{api => cri}/runtimeoptions/v1/api.proto (100%) rename pkg/{ => cri}/server/bandwidth/doc.go (100%) rename pkg/{ => cri}/server/bandwidth/fake_shaper.go (100%) rename pkg/{ => cri}/server/bandwidth/interfaces.go (100%) rename pkg/{ => cri}/server/bandwidth/linux.go (100%) rename pkg/{ => cri}/server/bandwidth/unsupported.go (100%) rename pkg/{ => cri}/server/bandwidth/utils.go (100%) rename pkg/{ => cri}/server/cni_conf_syncer.go (100%) rename pkg/{ => cri}/server/container_attach.go (98%) rename pkg/{ => cri}/server/container_create.go (98%) rename pkg/{ => cri}/server/container_create_linux.go (99%) rename pkg/{ => cri}/server/container_create_linux_test.go (99%) rename pkg/{ => cri}/server/container_create_other.go (97%) rename pkg/{ => cri}/server/container_create_other_test.go (100%) rename pkg/{ => cri}/server/container_create_test.go (99%) rename pkg/{ => cri}/server/container_create_windows.go (98%) rename pkg/{ => cri}/server/container_create_windows_test.go (99%) rename pkg/{ => cri}/server/container_exec.go (100%) rename pkg/{ => cri}/server/container_execsync.go (99%) rename pkg/{ => cri}/server/container_list.go (97%) rename pkg/{ => cri}/server/container_list_test.go (98%) rename pkg/{ => cri}/server/container_log_reopen.go (100%) rename pkg/{ => cri}/server/container_remove.go (97%) rename pkg/{ => cri}/server/container_remove_test.go (97%) rename pkg/{ => cri}/server/container_start.go (97%) rename pkg/{ => cri}/server/container_start_test.go (97%) rename pkg/{ => cri}/server/container_stats.go (100%) rename pkg/{ => cri}/server/container_stats_list.go (97%) rename pkg/{ => cri}/server/container_stats_list_linux.go (95%) rename pkg/{ => cri}/server/container_stats_list_linux_test.go (100%) rename pkg/{ => cri}/server/container_stats_list_other.go (93%) rename pkg/{ => cri}/server/container_stats_list_windows.go (97%) rename pkg/{ => cri}/server/container_status.go (97%) rename pkg/{ => cri}/server/container_status_test.go (97%) rename pkg/{ => cri}/server/container_stop.go (98%) rename pkg/{ => cri}/server/container_stop_test.go (96%) rename pkg/{ => cri}/server/container_update_resources_linux.go (98%) rename pkg/{ => cri}/server/container_update_resources_linux_test.go (100%) rename pkg/{ => cri}/server/container_update_resources_other.go (95%) rename pkg/{ => cri}/server/container_update_resources_windows.go (100%) rename pkg/{ => cri}/server/events.go (98%) rename pkg/{ => cri}/server/events_test.go (100%) rename pkg/{ => cri}/server/helpers.go (97%) rename pkg/{ => cri}/server/helpers_linux.go (100%) rename pkg/{ => cri}/server/helpers_linux_test.go (100%) rename pkg/{ => cri}/server/helpers_other.go (100%) rename pkg/{ => cri}/server/helpers_selinux_test.go (100%) rename pkg/{ => cri}/server/helpers_test.go (98%) rename pkg/{ => cri}/server/helpers_windows.go (100%) rename pkg/{ => cri}/server/image_list.go (100%) rename pkg/{ => cri}/server/image_list_test.go (98%) rename pkg/{ => cri}/server/image_pull.go (99%) rename pkg/{ => cri}/server/image_pull_test.go (99%) rename pkg/{ => cri}/server/image_remove.go (98%) rename pkg/{ => cri}/server/image_status.go (96%) rename pkg/{ => cri}/server/image_status_test.go (97%) rename pkg/{ => cri}/server/imagefs_info.go (100%) rename pkg/{ => cri}/server/imagefs_info_test.go (96%) rename pkg/{ => cri}/server/instrumented_service.go (100%) rename pkg/{ => cri}/server/opts.go (100%) rename pkg/{ => cri}/server/restart.go (98%) rename pkg/{ => cri}/server/sandbox_list.go (97%) rename pkg/{ => cri}/server/sandbox_list_test.go (98%) rename pkg/{ => cri}/server/sandbox_portforward.go (95%) rename pkg/{ => cri}/server/sandbox_portforward_linux.go (100%) rename pkg/{ => cri}/server/sandbox_portforward_other.go (100%) rename pkg/{ => cri}/server/sandbox_portforward_windows.go (97%) rename pkg/{ => cri}/server/sandbox_remove.go (97%) rename pkg/{ => cri}/server/sandbox_run.go (98%) rename pkg/{ => cri}/server/sandbox_run_linux.go (100%) rename pkg/{ => cri}/server/sandbox_run_linux_test.go (100%) rename pkg/{ => cri}/server/sandbox_run_other.go (100%) rename pkg/{ => cri}/server/sandbox_run_other_test.go (100%) rename pkg/{ => cri}/server/sandbox_run_test.go (99%) rename pkg/{ => cri}/server/sandbox_run_windows.go (100%) rename pkg/{ => cri}/server/sandbox_run_windows_test.go (100%) rename pkg/{ => cri}/server/sandbox_status.go (99%) rename pkg/{ => cri}/server/sandbox_status_test.go (97%) rename pkg/{ => cri}/server/sandbox_stop.go (98%) rename pkg/{ => cri}/server/sandbox_stop_test.go (96%) rename pkg/{ => cri}/server/service.go (96%) rename pkg/{ => cri}/server/service_linux.go (100%) rename pkg/{ => cri}/server/service_other.go (100%) rename pkg/{ => cri}/server/service_test.go (85%) rename pkg/{ => cri}/server/service_windows.go (100%) rename pkg/{ => cri}/server/snapshots.go (98%) rename pkg/{ => cri}/server/status.go (100%) rename pkg/{ => cri}/server/streaming.go (100%) rename pkg/{ => cri}/server/streaming_test.go (98%) rename pkg/{ => cri}/server/testing/fake_cni_plugin.go (100%) rename pkg/{ => cri}/server/update_runtime_config.go (100%) rename pkg/{ => cri}/server/update_runtime_config_test.go (96%) rename pkg/{ => cri}/server/version.go (100%) rename pkg/{ => cri}/store/container/container.go (96%) rename pkg/{ => cri}/store/container/container_test.go (97%) rename pkg/{ => cri}/store/container/fake_status.go (100%) rename pkg/{ => cri}/store/container/metadata.go (100%) rename pkg/{ => cri}/store/container/metadata_test.go (100%) rename pkg/{ => cri}/store/container/status.go (100%) rename pkg/{ => cri}/store/container/status_test.go (100%) rename pkg/{ => cri}/store/errors.go (100%) rename pkg/{ => cri}/store/errors_test.go (100%) rename pkg/{ => cri}/store/image/fake_image.go (100%) rename pkg/{ => cri}/store/image/image.go (99%) rename pkg/{ => cri}/store/image/image_test.go (99%) rename pkg/{ => cri}/store/label/label.go (100%) rename pkg/{ => cri}/store/label/label_test.go (100%) rename pkg/{ => cri}/store/sandbox/metadata.go (100%) rename pkg/{ => cri}/store/sandbox/metadata_test.go (100%) rename pkg/{ => cri}/store/sandbox/sandbox.go (97%) rename pkg/{ => cri}/store/sandbox/sandbox_test.go (97%) rename pkg/{ => cri}/store/sandbox/status.go (100%) rename pkg/{ => cri}/store/sandbox/status_test.go (100%) rename pkg/{ => cri}/store/snapshot/snapshot.go (97%) rename pkg/{ => cri}/store/snapshot/snapshot_test.go (97%) rename pkg/{ => cri}/store/util.go (100%) diff --git a/integration/main_test.go b/integration/main_test.go index 95480c382..88a5ced38 100644 --- a/integration/main_test.go +++ b/integration/main_test.go @@ -41,9 +41,9 @@ import ( "github.com/containerd/containerd/integration/remote" dialer "github.com/containerd/containerd/integration/util" - criconfig "github.com/containerd/containerd/pkg/config" "github.com/containerd/containerd/pkg/constants" - "github.com/containerd/containerd/pkg/server" + criconfig "github.com/containerd/containerd/pkg/cri/config" + "github.com/containerd/containerd/pkg/cri/server" "github.com/containerd/containerd/pkg/util" ) diff --git a/pkg/config/config.go b/pkg/cri/config/config.go similarity index 100% rename from pkg/config/config.go rename to pkg/cri/config/config.go diff --git a/pkg/config/config_test.go b/pkg/cri/config/config_test.go similarity index 100% rename from pkg/config/config_test.go rename to pkg/cri/config/config_test.go diff --git a/pkg/config/config_unix.go b/pkg/cri/config/config_unix.go similarity index 100% rename from pkg/config/config_unix.go rename to pkg/cri/config/config_unix.go diff --git a/pkg/config/config_windows.go b/pkg/cri/config/config_windows.go similarity index 100% rename from pkg/config/config_windows.go rename to pkg/cri/config/config_windows.go diff --git a/pkg/cri/cri.go b/pkg/cri/cri.go index 6150723fd..1bf5b9163 100644 --- a/pkg/cri/cri.go +++ b/pkg/cri/cri.go @@ -39,10 +39,10 @@ import ( "github.com/sirupsen/logrus" "k8s.io/klog/v2" - criconfig "github.com/containerd/containerd/pkg/config" "github.com/containerd/containerd/pkg/constants" criplatforms "github.com/containerd/containerd/pkg/containerd/platforms" - "github.com/containerd/containerd/pkg/server" + criconfig "github.com/containerd/containerd/pkg/cri/config" + "github.com/containerd/containerd/pkg/cri/server" ) // TODO(random-liu): Use github.com/pkg/errors for our errors. diff --git a/pkg/server/io/container_io.go b/pkg/cri/io/container_io.go similarity index 100% rename from pkg/server/io/container_io.go rename to pkg/cri/io/container_io.go diff --git a/pkg/server/io/exec_io.go b/pkg/cri/io/exec_io.go similarity index 100% rename from pkg/server/io/exec_io.go rename to pkg/cri/io/exec_io.go diff --git a/pkg/server/io/helpers.go b/pkg/cri/io/helpers.go similarity index 100% rename from pkg/server/io/helpers.go rename to pkg/cri/io/helpers.go diff --git a/pkg/server/io/helpers_unix.go b/pkg/cri/io/helpers_unix.go similarity index 100% rename from pkg/server/io/helpers_unix.go rename to pkg/cri/io/helpers_unix.go diff --git a/pkg/server/io/helpers_windows.go b/pkg/cri/io/helpers_windows.go similarity index 100% rename from pkg/server/io/helpers_windows.go rename to pkg/cri/io/helpers_windows.go diff --git a/pkg/server/io/logger.go b/pkg/cri/io/logger.go similarity index 100% rename from pkg/server/io/logger.go rename to pkg/cri/io/logger.go diff --git a/pkg/server/io/logger_test.go b/pkg/cri/io/logger_test.go similarity index 100% rename from pkg/server/io/logger_test.go rename to pkg/cri/io/logger_test.go diff --git a/pkg/api/runtimeoptions/v1/api.pb.go b/pkg/cri/runtimeoptions/v1/api.pb.go similarity index 100% rename from pkg/api/runtimeoptions/v1/api.pb.go rename to pkg/cri/runtimeoptions/v1/api.pb.go diff --git a/pkg/api/runtimeoptions/v1/api.proto b/pkg/cri/runtimeoptions/v1/api.proto similarity index 100% rename from pkg/api/runtimeoptions/v1/api.proto rename to pkg/cri/runtimeoptions/v1/api.proto diff --git a/pkg/server/bandwidth/doc.go b/pkg/cri/server/bandwidth/doc.go similarity index 100% rename from pkg/server/bandwidth/doc.go rename to pkg/cri/server/bandwidth/doc.go diff --git a/pkg/server/bandwidth/fake_shaper.go b/pkg/cri/server/bandwidth/fake_shaper.go similarity index 100% rename from pkg/server/bandwidth/fake_shaper.go rename to pkg/cri/server/bandwidth/fake_shaper.go diff --git a/pkg/server/bandwidth/interfaces.go b/pkg/cri/server/bandwidth/interfaces.go similarity index 100% rename from pkg/server/bandwidth/interfaces.go rename to pkg/cri/server/bandwidth/interfaces.go diff --git a/pkg/server/bandwidth/linux.go b/pkg/cri/server/bandwidth/linux.go similarity index 100% rename from pkg/server/bandwidth/linux.go rename to pkg/cri/server/bandwidth/linux.go diff --git a/pkg/server/bandwidth/unsupported.go b/pkg/cri/server/bandwidth/unsupported.go similarity index 100% rename from pkg/server/bandwidth/unsupported.go rename to pkg/cri/server/bandwidth/unsupported.go diff --git a/pkg/server/bandwidth/utils.go b/pkg/cri/server/bandwidth/utils.go similarity index 100% rename from pkg/server/bandwidth/utils.go rename to pkg/cri/server/bandwidth/utils.go diff --git a/pkg/server/cni_conf_syncer.go b/pkg/cri/server/cni_conf_syncer.go similarity index 100% rename from pkg/server/cni_conf_syncer.go rename to pkg/cri/server/cni_conf_syncer.go diff --git a/pkg/server/container_attach.go b/pkg/cri/server/container_attach.go similarity index 98% rename from pkg/server/container_attach.go rename to pkg/cri/server/container_attach.go index 9f06e25ad..b8b8a2cf1 100644 --- a/pkg/server/container_attach.go +++ b/pkg/cri/server/container_attach.go @@ -26,7 +26,7 @@ import ( "k8s.io/client-go/tools/remotecommand" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - cio "github.com/containerd/containerd/pkg/server/io" + cio "github.com/containerd/containerd/pkg/cri/io" ) // Attach prepares a streaming endpoint to attach to a running container, and returns the address. diff --git a/pkg/server/container_create.go b/pkg/cri/server/container_create.go similarity index 98% rename from pkg/server/container_create.go rename to pkg/cri/server/container_create.go index ae7762a23..f72f89982 100644 --- a/pkg/server/container_create.go +++ b/pkg/cri/server/container_create.go @@ -35,14 +35,14 @@ import ( 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" + cio "github.com/containerd/containerd/pkg/cri/io" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" "github.com/containerd/containerd/pkg/util" ) func init() { typeurl.Register(&containerstore.Metadata{}, - "github.com/containerd/containerd/pkg/store/container", "Metadata") + "github.com/containerd/cri/pkg/store/container", "Metadata") } // CreateContainer creates a new container in the given PodSandbox. diff --git a/pkg/server/container_create_linux.go b/pkg/cri/server/container_create_linux.go similarity index 99% rename from pkg/server/container_create_linux.go rename to pkg/cri/server/container_create_linux.go index db32b7559..3c69dd87d 100644 --- a/pkg/server/container_create_linux.go +++ b/pkg/cri/server/container_create_linux.go @@ -35,8 +35,8 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "github.com/containerd/containerd/pkg/annotations" - "github.com/containerd/containerd/pkg/config" customopts "github.com/containerd/containerd/pkg/containerd/opts" + "github.com/containerd/containerd/pkg/cri/config" ) const ( diff --git a/pkg/server/container_create_linux_test.go b/pkg/cri/server/container_create_linux_test.go similarity index 99% rename from pkg/server/container_create_linux_test.go rename to pkg/cri/server/container_create_linux_test.go index 843f8ed08..52bab35df 100644 --- a/pkg/server/container_create_linux_test.go +++ b/pkg/cri/server/container_create_linux_test.go @@ -41,9 +41,9 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "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" + "github.com/containerd/containerd/pkg/cri/config" ostesting "github.com/containerd/containerd/pkg/os/testing" "github.com/containerd/containerd/pkg/util" ) diff --git a/pkg/server/container_create_other.go b/pkg/cri/server/container_create_other.go similarity index 97% rename from pkg/server/container_create_other.go rename to pkg/cri/server/container_create_other.go index 12e5ae95c..e8af1488c 100644 --- a/pkg/server/container_create_other.go +++ b/pkg/cri/server/container_create_other.go @@ -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/containerd/pkg/config" + "github.com/containerd/containerd/pkg/cri/config" ) // containerMounts sets up necessary container system file mounts diff --git a/pkg/server/container_create_other_test.go b/pkg/cri/server/container_create_other_test.go similarity index 100% rename from pkg/server/container_create_other_test.go rename to pkg/cri/server/container_create_other_test.go diff --git a/pkg/server/container_create_test.go b/pkg/cri/server/container_create_test.go similarity index 99% rename from pkg/server/container_create_test.go rename to pkg/cri/server/container_create_test.go index 3fadd48f2..e9b9746e3 100644 --- a/pkg/server/container_create_test.go +++ b/pkg/cri/server/container_create_test.go @@ -28,9 +28,9 @@ import ( "github.com/stretchr/testify/require" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "github.com/containerd/containerd/pkg/config" "github.com/containerd/containerd/pkg/constants" "github.com/containerd/containerd/pkg/containerd/opts" + "github.com/containerd/containerd/pkg/cri/config" ) func checkMount(t *testing.T, mounts []runtimespec.Mount, src, dest, typ string, diff --git a/pkg/server/container_create_windows.go b/pkg/cri/server/container_create_windows.go similarity index 98% rename from pkg/server/container_create_windows.go rename to pkg/cri/server/container_create_windows.go index f41447650..731417515 100644 --- a/pkg/server/container_create_windows.go +++ b/pkg/cri/server/container_create_windows.go @@ -25,8 +25,8 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "github.com/containerd/containerd/pkg/annotations" - "github.com/containerd/containerd/pkg/config" customopts "github.com/containerd/containerd/pkg/containerd/opts" + "github.com/containerd/containerd/pkg/cri/config" ) // No container mounts for windows. diff --git a/pkg/server/container_create_windows_test.go b/pkg/cri/server/container_create_windows_test.go similarity index 99% rename from pkg/server/container_create_windows_test.go rename to pkg/cri/server/container_create_windows_test.go index 8de431f5d..348a75f0d 100644 --- a/pkg/server/container_create_windows_test.go +++ b/pkg/cri/server/container_create_windows_test.go @@ -27,7 +27,7 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "github.com/containerd/containerd/pkg/annotations" - "github.com/containerd/containerd/pkg/config" + "github.com/containerd/containerd/pkg/cri/config" ) func getCreateContainerTestData() (*runtime.ContainerConfig, *runtime.PodSandboxConfig, diff --git a/pkg/server/container_exec.go b/pkg/cri/server/container_exec.go similarity index 100% rename from pkg/server/container_exec.go rename to pkg/cri/server/container_exec.go diff --git a/pkg/server/container_execsync.go b/pkg/cri/server/container_execsync.go similarity index 99% rename from pkg/server/container_execsync.go rename to pkg/cri/server/container_execsync.go index 7397d7055..1290088c7 100644 --- a/pkg/server/container_execsync.go +++ b/pkg/cri/server/container_execsync.go @@ -33,8 +33,8 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ctrdutil "github.com/containerd/containerd/pkg/containerd/util" + cio "github.com/containerd/containerd/pkg/cri/io" cioutil "github.com/containerd/containerd/pkg/ioutil" - cio "github.com/containerd/containerd/pkg/server/io" "github.com/containerd/containerd/pkg/util" ) diff --git a/pkg/server/container_list.go b/pkg/cri/server/container_list.go similarity index 97% rename from pkg/server/container_list.go rename to pkg/cri/server/container_list.go index c27e231df..74be1a10b 100644 --- a/pkg/server/container_list.go +++ b/pkg/cri/server/container_list.go @@ -21,7 +21,7 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - containerstore "github.com/containerd/containerd/pkg/store/container" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) // ListContainers lists all containers matching the filter. diff --git a/pkg/server/container_list_test.go b/pkg/cri/server/container_list_test.go similarity index 98% rename from pkg/server/container_list_test.go rename to pkg/cri/server/container_list_test.go index a80d516a7..5def2e720 100644 --- a/pkg/server/container_list_test.go +++ b/pkg/cri/server/container_list_test.go @@ -25,8 +25,8 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - containerstore "github.com/containerd/containerd/pkg/store/container" - sandboxstore "github.com/containerd/containerd/pkg/store/sandbox" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) func TestToCRIContainer(t *testing.T) { diff --git a/pkg/server/container_log_reopen.go b/pkg/cri/server/container_log_reopen.go similarity index 100% rename from pkg/server/container_log_reopen.go rename to pkg/cri/server/container_log_reopen.go diff --git a/pkg/server/container_remove.go b/pkg/cri/server/container_remove.go similarity index 97% rename from pkg/server/container_remove.go rename to pkg/cri/server/container_remove.go index 15f982d2f..c27830ec2 100644 --- a/pkg/server/container_remove.go +++ b/pkg/cri/server/container_remove.go @@ -25,8 +25,8 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "github.com/containerd/containerd/pkg/store" - containerstore "github.com/containerd/containerd/pkg/store/container" + "github.com/containerd/containerd/pkg/cri/store" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) // RemoveContainer removes the container. diff --git a/pkg/server/container_remove_test.go b/pkg/cri/server/container_remove_test.go similarity index 97% rename from pkg/server/container_remove_test.go rename to pkg/cri/server/container_remove_test.go index d1afd372a..8c38afdd6 100644 --- a/pkg/server/container_remove_test.go +++ b/pkg/cri/server/container_remove_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - containerstore "github.com/containerd/containerd/pkg/store/container" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) // TestSetContainerRemoving tests setContainerRemoving sets removing diff --git a/pkg/server/container_start.go b/pkg/cri/server/container_start.go similarity index 97% rename from pkg/server/container_start.go rename to pkg/cri/server/container_start.go index 79c7f761e..9ad403ae5 100644 --- a/pkg/server/container_start.go +++ b/pkg/cri/server/container_start.go @@ -32,10 +32,10 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ctrdutil "github.com/containerd/containerd/pkg/containerd/util" + cio "github.com/containerd/containerd/pkg/cri/io" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" 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. diff --git a/pkg/server/container_start_test.go b/pkg/cri/server/container_start_test.go similarity index 97% rename from pkg/server/container_start_test.go rename to pkg/cri/server/container_start_test.go index 5ca308687..31562748d 100644 --- a/pkg/server/container_start_test.go +++ b/pkg/cri/server/container_start_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - containerstore "github.com/containerd/containerd/pkg/store/container" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) // TestSetContainerStarting tests setContainerStarting sets removing diff --git a/pkg/server/container_stats.go b/pkg/cri/server/container_stats.go similarity index 100% rename from pkg/server/container_stats.go rename to pkg/cri/server/container_stats.go diff --git a/pkg/server/container_stats_list.go b/pkg/cri/server/container_stats_list.go similarity index 97% rename from pkg/server/container_stats_list.go rename to pkg/cri/server/container_stats_list.go index 3b6ea29ac..777d10524 100644 --- a/pkg/server/container_stats_list.go +++ b/pkg/cri/server/container_stats_list.go @@ -23,7 +23,7 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - containerstore "github.com/containerd/containerd/pkg/store/container" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) // ListContainerStats returns stats of all running containers. diff --git a/pkg/server/container_stats_list_linux.go b/pkg/cri/server/container_stats_list_linux.go similarity index 95% rename from pkg/server/container_stats_list_linux.go rename to pkg/cri/server/container_stats_list_linux.go index 82b040d3f..d0a3d55b7 100644 --- a/pkg/server/container_stats_list_linux.go +++ b/pkg/cri/server/container_stats_list_linux.go @@ -17,8 +17,6 @@ package server import ( - "fmt" - "github.com/containerd/containerd/api/types" v1 "github.com/containerd/containerd/metrics/types/v1" v2 "github.com/containerd/containerd/metrics/types/v2" @@ -26,7 +24,7 @@ import ( "github.com/pkg/errors" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - containerstore "github.com/containerd/containerd/pkg/store/container" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) func (c *criService) containerMetrics( @@ -94,7 +92,7 @@ func (c *criService) containerMetrics( } } default: - return &cs, errors.New(fmt.Sprintf("unxpected metrics type: %v", metrics)) + return &cs, errors.Errorf("unxpected metrics type: %v", metrics) } } diff --git a/pkg/server/container_stats_list_linux_test.go b/pkg/cri/server/container_stats_list_linux_test.go similarity index 100% rename from pkg/server/container_stats_list_linux_test.go rename to pkg/cri/server/container_stats_list_linux_test.go diff --git a/pkg/server/container_stats_list_other.go b/pkg/cri/server/container_stats_list_other.go similarity index 93% rename from pkg/server/container_stats_list_other.go rename to pkg/cri/server/container_stats_list_other.go index 02a99978a..1d5327e53 100644 --- a/pkg/server/container_stats_list_other.go +++ b/pkg/cri/server/container_stats_list_other.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - containerstore "github.com/containerd/containerd/pkg/store/container" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) func (c *criService) containerMetrics( diff --git a/pkg/server/container_stats_list_windows.go b/pkg/cri/server/container_stats_list_windows.go similarity index 97% rename from pkg/server/container_stats_list_windows.go rename to pkg/cri/server/container_stats_list_windows.go index 733a06d07..e2c29271d 100644 --- a/pkg/server/container_stats_list_windows.go +++ b/pkg/cri/server/container_stats_list_windows.go @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - containerstore "github.com/containerd/containerd/pkg/store/container" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) func (c *criService) containerMetrics( diff --git a/pkg/server/container_status.go b/pkg/cri/server/container_status.go similarity index 97% rename from pkg/server/container_status.go rename to pkg/cri/server/container_status.go index 952660efa..4281be6b9 100644 --- a/pkg/server/container_status.go +++ b/pkg/cri/server/container_status.go @@ -24,8 +24,8 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "github.com/containerd/containerd/pkg/store" - containerstore "github.com/containerd/containerd/pkg/store/container" + "github.com/containerd/containerd/pkg/cri/store" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) // ContainerStatus inspects the container and returns the status. diff --git a/pkg/server/container_status_test.go b/pkg/cri/server/container_status_test.go similarity index 97% rename from pkg/server/container_status_test.go rename to pkg/cri/server/container_status_test.go index da036aac7..ea7bbe7c2 100644 --- a/pkg/server/container_status_test.go +++ b/pkg/cri/server/container_status_test.go @@ -24,8 +24,8 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - containerstore "github.com/containerd/containerd/pkg/store/container" - imagestore "github.com/containerd/containerd/pkg/store/image" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" + imagestore "github.com/containerd/containerd/pkg/cri/store/image" ) func getContainerStatusTestData() (*containerstore.Metadata, *containerstore.Status, diff --git a/pkg/server/container_stop.go b/pkg/cri/server/container_stop.go similarity index 98% rename from pkg/server/container_stop.go rename to pkg/cri/server/container_stop.go index 469376e45..4ca297d1c 100644 --- a/pkg/server/container_stop.go +++ b/pkg/cri/server/container_stop.go @@ -29,8 +29,8 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ctrdutil "github.com/containerd/containerd/pkg/containerd/util" - "github.com/containerd/containerd/pkg/store" - containerstore "github.com/containerd/containerd/pkg/store/container" + "github.com/containerd/containerd/pkg/cri/store" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) // StopContainer stops a running container with a grace period (i.e., timeout). diff --git a/pkg/server/container_stop_test.go b/pkg/cri/server/container_stop_test.go similarity index 96% rename from pkg/server/container_stop_test.go rename to pkg/cri/server/container_stop_test.go index 8d2fa140a..508560d4a 100644 --- a/pkg/server/container_stop_test.go +++ b/pkg/cri/server/container_stop_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" "golang.org/x/net/context" - containerstore "github.com/containerd/containerd/pkg/store/container" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) func TestWaitContainerStop(t *testing.T) { diff --git a/pkg/server/container_update_resources_linux.go b/pkg/cri/server/container_update_resources_linux.go similarity index 98% rename from pkg/server/container_update_resources_linux.go rename to pkg/cri/server/container_update_resources_linux.go index 6857575bd..3f791fd7f 100644 --- a/pkg/server/container_update_resources_linux.go +++ b/pkg/cri/server/container_update_resources_linux.go @@ -31,7 +31,7 @@ import ( "github.com/containerd/containerd/pkg/containerd/opts" ctrdutil "github.com/containerd/containerd/pkg/containerd/util" - containerstore "github.com/containerd/containerd/pkg/store/container" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" "github.com/containerd/containerd/pkg/util" ) diff --git a/pkg/server/container_update_resources_linux_test.go b/pkg/cri/server/container_update_resources_linux_test.go similarity index 100% rename from pkg/server/container_update_resources_linux_test.go rename to pkg/cri/server/container_update_resources_linux_test.go diff --git a/pkg/server/container_update_resources_other.go b/pkg/cri/server/container_update_resources_other.go similarity index 95% rename from pkg/server/container_update_resources_other.go rename to pkg/cri/server/container_update_resources_other.go index e4370324b..88bb1ef4e 100644 --- a/pkg/server/container_update_resources_other.go +++ b/pkg/cri/server/container_update_resources_other.go @@ -23,7 +23,7 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - containerstore "github.com/containerd/containerd/pkg/store/container" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" ) // UpdateContainerResources updates ContainerConfig of the container. diff --git a/pkg/server/container_update_resources_windows.go b/pkg/cri/server/container_update_resources_windows.go similarity index 100% rename from pkg/server/container_update_resources_windows.go rename to pkg/cri/server/container_update_resources_windows.go diff --git a/pkg/server/events.go b/pkg/cri/server/events.go similarity index 98% rename from pkg/server/events.go rename to pkg/cri/server/events.go index b9aabe597..49f6ac691 100644 --- a/pkg/server/events.go +++ b/pkg/cri/server/events.go @@ -34,9 +34,9 @@ import ( "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" + "github.com/containerd/containerd/pkg/cri/store" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) const ( diff --git a/pkg/server/events_test.go b/pkg/cri/server/events_test.go similarity index 100% rename from pkg/server/events_test.go rename to pkg/cri/server/events_test.go diff --git a/pkg/server/helpers.go b/pkg/cri/server/helpers.go similarity index 97% rename from pkg/server/helpers.go rename to pkg/cri/server/helpers.go index 0e09d0321..3514e680b 100644 --- a/pkg/server/helpers.go +++ b/pkg/cri/server/helpers.go @@ -37,12 +37,12 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - 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" + criconfig "github.com/containerd/containerd/pkg/cri/config" + runtimeoptions "github.com/containerd/containerd/pkg/cri/runtimeoptions/v1" + "github.com/containerd/containerd/pkg/cri/store" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" + imagestore "github.com/containerd/containerd/pkg/cri/store/image" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) const ( diff --git a/pkg/server/helpers_linux.go b/pkg/cri/server/helpers_linux.go similarity index 100% rename from pkg/server/helpers_linux.go rename to pkg/cri/server/helpers_linux.go diff --git a/pkg/server/helpers_linux_test.go b/pkg/cri/server/helpers_linux_test.go similarity index 100% rename from pkg/server/helpers_linux_test.go rename to pkg/cri/server/helpers_linux_test.go diff --git a/pkg/server/helpers_other.go b/pkg/cri/server/helpers_other.go similarity index 100% rename from pkg/server/helpers_other.go rename to pkg/cri/server/helpers_other.go diff --git a/pkg/server/helpers_selinux_test.go b/pkg/cri/server/helpers_selinux_test.go similarity index 100% rename from pkg/server/helpers_selinux_test.go rename to pkg/cri/server/helpers_selinux_test.go diff --git a/pkg/server/helpers_test.go b/pkg/cri/server/helpers_test.go similarity index 98% rename from pkg/server/helpers_test.go rename to pkg/cri/server/helpers_test.go index fa65002b2..5c4e6ad45 100644 --- a/pkg/server/helpers_test.go +++ b/pkg/cri/server/helpers_test.go @@ -32,9 +32,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - criconfig "github.com/containerd/containerd/pkg/config" - "github.com/containerd/containerd/pkg/store" - imagestore "github.com/containerd/containerd/pkg/store/image" + criconfig "github.com/containerd/containerd/pkg/cri/config" + "github.com/containerd/containerd/pkg/cri/store" + imagestore "github.com/containerd/containerd/pkg/cri/store/image" ) // TestGetUserFromImage tests the logic of getting image uid or user name of image user. diff --git a/pkg/server/helpers_windows.go b/pkg/cri/server/helpers_windows.go similarity index 100% rename from pkg/server/helpers_windows.go rename to pkg/cri/server/helpers_windows.go diff --git a/pkg/server/image_list.go b/pkg/cri/server/image_list.go similarity index 100% rename from pkg/server/image_list.go rename to pkg/cri/server/image_list.go diff --git a/pkg/server/image_list_test.go b/pkg/cri/server/image_list_test.go similarity index 98% rename from pkg/server/image_list_test.go rename to pkg/cri/server/image_list_test.go index c630f19d2..32161ff70 100644 --- a/pkg/server/image_list_test.go +++ b/pkg/cri/server/image_list_test.go @@ -25,7 +25,7 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - imagestore "github.com/containerd/containerd/pkg/store/image" + imagestore "github.com/containerd/containerd/pkg/cri/store/image" ) func TestListImages(t *testing.T) { diff --git a/pkg/server/image_pull.go b/pkg/cri/server/image_pull.go similarity index 99% rename from pkg/server/image_pull.go rename to pkg/cri/server/image_pull.go index d6627bd04..dab2269d1 100644 --- a/pkg/server/image_pull.go +++ b/pkg/cri/server/image_pull.go @@ -42,7 +42,7 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - criconfig "github.com/containerd/containerd/pkg/config" + criconfig "github.com/containerd/containerd/pkg/cri/config" ) // For image management: diff --git a/pkg/server/image_pull_test.go b/pkg/cri/server/image_pull_test.go similarity index 99% rename from pkg/server/image_pull_test.go rename to pkg/cri/server/image_pull_test.go index c41039c1a..b6aee2625 100644 --- a/pkg/server/image_pull_test.go +++ b/pkg/cri/server/image_pull_test.go @@ -28,7 +28,7 @@ import ( "github.com/stretchr/testify/assert" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - criconfig "github.com/containerd/containerd/pkg/config" + criconfig "github.com/containerd/containerd/pkg/cri/config" ) func TestParseAuth(t *testing.T) { diff --git a/pkg/server/image_remove.go b/pkg/cri/server/image_remove.go similarity index 98% rename from pkg/server/image_remove.go rename to pkg/cri/server/image_remove.go index ec54b9d55..1e0ce6968 100644 --- a/pkg/server/image_remove.go +++ b/pkg/cri/server/image_remove.go @@ -23,7 +23,7 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "github.com/containerd/containerd/pkg/store" + "github.com/containerd/containerd/pkg/cri/store" ) // RemoveImage removes the image. diff --git a/pkg/server/image_status.go b/pkg/cri/server/image_status.go similarity index 96% rename from pkg/server/image_status.go rename to pkg/cri/server/image_status.go index ad6502d38..5202f5d9c 100644 --- a/pkg/server/image_status.go +++ b/pkg/cri/server/image_status.go @@ -25,8 +25,8 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "github.com/containerd/containerd/pkg/store" - imagestore "github.com/containerd/containerd/pkg/store/image" + "github.com/containerd/containerd/pkg/cri/store" + imagestore "github.com/containerd/containerd/pkg/cri/store/image" ) // ImageStatus returns the status of the image, returns nil if the image isn't present. diff --git a/pkg/server/image_status_test.go b/pkg/cri/server/image_status_test.go similarity index 97% rename from pkg/server/image_status_test.go rename to pkg/cri/server/image_status_test.go index f91b19588..5ac029bb9 100644 --- a/pkg/server/image_status_test.go +++ b/pkg/cri/server/image_status_test.go @@ -25,7 +25,7 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - imagestore "github.com/containerd/containerd/pkg/store/image" + imagestore "github.com/containerd/containerd/pkg/cri/store/image" ) func TestImageStatus(t *testing.T) { diff --git a/pkg/server/imagefs_info.go b/pkg/cri/server/imagefs_info.go similarity index 100% rename from pkg/server/imagefs_info.go rename to pkg/cri/server/imagefs_info.go diff --git a/pkg/server/imagefs_info_test.go b/pkg/cri/server/imagefs_info_test.go similarity index 96% rename from pkg/server/imagefs_info_test.go rename to pkg/cri/server/imagefs_info_test.go index bf4bdb267..d70231d36 100644 --- a/pkg/server/imagefs_info_test.go +++ b/pkg/cri/server/imagefs_info_test.go @@ -25,7 +25,7 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - snapshotstore "github.com/containerd/containerd/pkg/store/snapshot" + snapshotstore "github.com/containerd/containerd/pkg/cri/store/snapshot" ) func TestImageFsInfo(t *testing.T) { diff --git a/pkg/server/instrumented_service.go b/pkg/cri/server/instrumented_service.go similarity index 100% rename from pkg/server/instrumented_service.go rename to pkg/cri/server/instrumented_service.go diff --git a/pkg/server/opts.go b/pkg/cri/server/opts.go similarity index 100% rename from pkg/server/opts.go rename to pkg/cri/server/opts.go diff --git a/pkg/server/restart.go b/pkg/cri/server/restart.go similarity index 98% rename from pkg/server/restart.go rename to pkg/cri/server/restart.go index fb3b3e174..1b05c8ac7 100644 --- a/pkg/server/restart.go +++ b/pkg/cri/server/restart.go @@ -35,10 +35,10 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ctrdutil "github.com/containerd/containerd/pkg/containerd/util" + cio "github.com/containerd/containerd/pkg/cri/io" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" "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: diff --git a/pkg/server/sandbox_list.go b/pkg/cri/server/sandbox_list.go similarity index 97% rename from pkg/server/sandbox_list.go rename to pkg/cri/server/sandbox_list.go index 50e552d7c..a0835aa0b 100644 --- a/pkg/server/sandbox_list.go +++ b/pkg/cri/server/sandbox_list.go @@ -20,7 +20,7 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - sandboxstore "github.com/containerd/containerd/pkg/store/sandbox" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) // ListPodSandbox returns a list of Sandbox. diff --git a/pkg/server/sandbox_list_test.go b/pkg/cri/server/sandbox_list_test.go similarity index 98% rename from pkg/server/sandbox_list_test.go rename to pkg/cri/server/sandbox_list_test.go index f22285889..dd4ac21e6 100644 --- a/pkg/server/sandbox_list_test.go +++ b/pkg/cri/server/sandbox_list_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - sandboxstore "github.com/containerd/containerd/pkg/store/sandbox" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) func TestToCRISandbox(t *testing.T) { diff --git a/pkg/server/sandbox_portforward.go b/pkg/cri/server/sandbox_portforward.go similarity index 95% rename from pkg/server/sandbox_portforward.go rename to pkg/cri/server/sandbox_portforward.go index 15d9ed635..00fb292e6 100644 --- a/pkg/server/sandbox_portforward.go +++ b/pkg/cri/server/sandbox_portforward.go @@ -21,7 +21,7 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - sandboxstore "github.com/containerd/containerd/pkg/store/sandbox" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) // PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address. diff --git a/pkg/server/sandbox_portforward_linux.go b/pkg/cri/server/sandbox_portforward_linux.go similarity index 100% rename from pkg/server/sandbox_portforward_linux.go rename to pkg/cri/server/sandbox_portforward_linux.go diff --git a/pkg/server/sandbox_portforward_other.go b/pkg/cri/server/sandbox_portforward_other.go similarity index 100% rename from pkg/server/sandbox_portforward_other.go rename to pkg/cri/server/sandbox_portforward_other.go diff --git a/pkg/server/sandbox_portforward_windows.go b/pkg/cri/server/sandbox_portforward_windows.go similarity index 97% rename from pkg/server/sandbox_portforward_windows.go rename to pkg/cri/server/sandbox_portforward_windows.go index 127ef2b50..70f1ef829 100644 --- a/pkg/server/sandbox_portforward_windows.go +++ b/pkg/cri/server/sandbox_portforward_windows.go @@ -27,8 +27,8 @@ import ( "golang.org/x/net/context" "k8s.io/utils/exec" + sandboxstore "github.com/containerd/containerd/pkg/cri/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 { diff --git a/pkg/server/sandbox_remove.go b/pkg/cri/server/sandbox_remove.go similarity index 97% rename from pkg/server/sandbox_remove.go rename to pkg/cri/server/sandbox_remove.go index 929528664..0192fff2e 100644 --- a/pkg/server/sandbox_remove.go +++ b/pkg/cri/server/sandbox_remove.go @@ -25,8 +25,8 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "github.com/containerd/containerd/pkg/store" - sandboxstore "github.com/containerd/containerd/pkg/store/sandbox" + "github.com/containerd/containerd/pkg/cri/store" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) // RemovePodSandbox removes the sandbox. If there are running containers in the diff --git a/pkg/server/sandbox_run.go b/pkg/cri/server/sandbox_run.go similarity index 98% rename from pkg/server/sandbox_run.go rename to pkg/cri/server/sandbox_run.go index cc6e8d6fa..6ed3d5b9f 100644 --- a/pkg/server/sandbox_run.go +++ b/pkg/cri/server/sandbox_run.go @@ -37,19 +37,19 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "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" + criconfig "github.com/containerd/containerd/pkg/cri/config" + "github.com/containerd/containerd/pkg/cri/server/bandwidth" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" "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/containerd/pkg/store/sandbox", "Metadata") + "github.com/containerd/cri/pkg/store/sandbox", "Metadata") } // RunPodSandbox creates and starts a pod-level sandbox. Runtimes should ensure diff --git a/pkg/server/sandbox_run_linux.go b/pkg/cri/server/sandbox_run_linux.go similarity index 100% rename from pkg/server/sandbox_run_linux.go rename to pkg/cri/server/sandbox_run_linux.go diff --git a/pkg/server/sandbox_run_linux_test.go b/pkg/cri/server/sandbox_run_linux_test.go similarity index 100% rename from pkg/server/sandbox_run_linux_test.go rename to pkg/cri/server/sandbox_run_linux_test.go diff --git a/pkg/server/sandbox_run_other.go b/pkg/cri/server/sandbox_run_other.go similarity index 100% rename from pkg/server/sandbox_run_other.go rename to pkg/cri/server/sandbox_run_other.go diff --git a/pkg/server/sandbox_run_other_test.go b/pkg/cri/server/sandbox_run_other_test.go similarity index 100% rename from pkg/server/sandbox_run_other_test.go rename to pkg/cri/server/sandbox_run_other_test.go diff --git a/pkg/server/sandbox_run_test.go b/pkg/cri/server/sandbox_run_test.go similarity index 99% rename from pkg/server/sandbox_run_test.go rename to pkg/cri/server/sandbox_run_test.go index cb06b8cba..3754cca2f 100644 --- a/pkg/server/sandbox_run_test.go +++ b/pkg/cri/server/sandbox_run_test.go @@ -28,8 +28,8 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "github.com/containerd/containerd/pkg/annotations" - criconfig "github.com/containerd/containerd/pkg/config" - sandboxstore "github.com/containerd/containerd/pkg/store/sandbox" + criconfig "github.com/containerd/containerd/pkg/cri/config" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) func TestSandboxContainerSpec(t *testing.T) { diff --git a/pkg/server/sandbox_run_windows.go b/pkg/cri/server/sandbox_run_windows.go similarity index 100% rename from pkg/server/sandbox_run_windows.go rename to pkg/cri/server/sandbox_run_windows.go diff --git a/pkg/server/sandbox_run_windows_test.go b/pkg/cri/server/sandbox_run_windows_test.go similarity index 100% rename from pkg/server/sandbox_run_windows_test.go rename to pkg/cri/server/sandbox_run_windows_test.go diff --git a/pkg/server/sandbox_status.go b/pkg/cri/server/sandbox_status.go similarity index 99% rename from pkg/server/sandbox_status.go rename to pkg/cri/server/sandbox_status.go index 66b4919bf..8c097a007 100644 --- a/pkg/server/sandbox_status.go +++ b/pkg/cri/server/sandbox_status.go @@ -28,7 +28,7 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - sandboxstore "github.com/containerd/containerd/pkg/store/sandbox" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) // PodSandboxStatus returns the status of the PodSandbox. diff --git a/pkg/server/sandbox_status_test.go b/pkg/cri/server/sandbox_status_test.go similarity index 97% rename from pkg/server/sandbox_status_test.go rename to pkg/cri/server/sandbox_status_test.go index d09d253e6..2d7944461 100644 --- a/pkg/server/sandbox_status_test.go +++ b/pkg/cri/server/sandbox_status_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - sandboxstore "github.com/containerd/containerd/pkg/store/sandbox" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) func TestPodSandboxStatus(t *testing.T) { diff --git a/pkg/server/sandbox_stop.go b/pkg/cri/server/sandbox_stop.go similarity index 98% rename from pkg/server/sandbox_stop.go rename to pkg/cri/server/sandbox_stop.go index a931505e5..1e40a53f6 100644 --- a/pkg/server/sandbox_stop.go +++ b/pkg/cri/server/sandbox_stop.go @@ -28,7 +28,7 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ctrdutil "github.com/containerd/containerd/pkg/containerd/util" - sandboxstore "github.com/containerd/containerd/pkg/store/sandbox" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) // StopPodSandbox stops the sandbox. If there are any running containers in the diff --git a/pkg/server/sandbox_stop_test.go b/pkg/cri/server/sandbox_stop_test.go similarity index 96% rename from pkg/server/sandbox_stop_test.go rename to pkg/cri/server/sandbox_stop_test.go index 53d8ca477..41b13217a 100644 --- a/pkg/server/sandbox_stop_test.go +++ b/pkg/cri/server/sandbox_stop_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" "golang.org/x/net/context" - sandboxstore "github.com/containerd/containerd/pkg/store/sandbox" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" ) func TestWaitSandboxStop(t *testing.T) { diff --git a/pkg/server/service.go b/pkg/cri/server/service.go similarity index 96% rename from pkg/server/service.go rename to pkg/cri/server/service.go index bd0b480bb..299ac9c5e 100644 --- a/pkg/server/service.go +++ b/pkg/cri/server/service.go @@ -35,17 +35,17 @@ import ( "google.golang.org/grpc" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "github.com/containerd/containerd/pkg/store/label" + "github.com/containerd/containerd/pkg/cri/store/label" "github.com/containerd/containerd/pkg/atomic" - criconfig "github.com/containerd/containerd/pkg/config" ctrdutil "github.com/containerd/containerd/pkg/containerd/util" + criconfig "github.com/containerd/containerd/pkg/cri/config" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" + imagestore "github.com/containerd/containerd/pkg/cri/store/image" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" + snapshotstore "github.com/containerd/containerd/pkg/cri/store/snapshot" 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. diff --git a/pkg/server/service_linux.go b/pkg/cri/server/service_linux.go similarity index 100% rename from pkg/server/service_linux.go rename to pkg/cri/server/service_linux.go diff --git a/pkg/server/service_other.go b/pkg/cri/server/service_other.go similarity index 100% rename from pkg/server/service_other.go rename to pkg/cri/server/service_other.go diff --git a/pkg/server/service_test.go b/pkg/cri/server/service_test.go similarity index 85% rename from pkg/server/service_test.go rename to pkg/cri/server/service_test.go index fe09b9471..50b015396 100644 --- a/pkg/server/service_test.go +++ b/pkg/cri/server/service_test.go @@ -26,15 +26,15 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - criconfig "github.com/containerd/containerd/pkg/config" + criconfig "github.com/containerd/containerd/pkg/cri/config" + servertesting "github.com/containerd/containerd/pkg/cri/server/testing" + containerstore "github.com/containerd/containerd/pkg/cri/store/container" + imagestore "github.com/containerd/containerd/pkg/cri/store/image" + "github.com/containerd/containerd/pkg/cri/store/label" + sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox" + snapshotstore "github.com/containerd/containerd/pkg/cri/store/snapshot" 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 ( diff --git a/pkg/server/service_windows.go b/pkg/cri/server/service_windows.go similarity index 100% rename from pkg/server/service_windows.go rename to pkg/cri/server/service_windows.go diff --git a/pkg/server/snapshots.go b/pkg/cri/server/snapshots.go similarity index 98% rename from pkg/server/snapshots.go rename to pkg/cri/server/snapshots.go index 33d8d7ec4..ba4f84644 100644 --- a/pkg/server/snapshots.go +++ b/pkg/cri/server/snapshots.go @@ -26,7 +26,7 @@ import ( "github.com/sirupsen/logrus" ctrdutil "github.com/containerd/containerd/pkg/containerd/util" - snapshotstore "github.com/containerd/containerd/pkg/store/snapshot" + snapshotstore "github.com/containerd/containerd/pkg/cri/store/snapshot" ) // snapshotsSyncer syncs snapshot stats periodically. imagefs info and container stats diff --git a/pkg/server/status.go b/pkg/cri/server/status.go similarity index 100% rename from pkg/server/status.go rename to pkg/cri/server/status.go diff --git a/pkg/server/streaming.go b/pkg/cri/server/streaming.go similarity index 100% rename from pkg/server/streaming.go rename to pkg/cri/server/streaming.go diff --git a/pkg/server/streaming_test.go b/pkg/cri/server/streaming_test.go similarity index 98% rename from pkg/server/streaming_test.go rename to pkg/cri/server/streaming_test.go index 3d085796a..32db53261 100644 --- a/pkg/server/streaming_test.go +++ b/pkg/cri/server/streaming_test.go @@ -19,7 +19,7 @@ package server import ( "testing" - "github.com/containerd/containerd/pkg/config" + "github.com/containerd/containerd/pkg/cri/config" "github.com/stretchr/testify/assert" ) diff --git a/pkg/server/testing/fake_cni_plugin.go b/pkg/cri/server/testing/fake_cni_plugin.go similarity index 100% rename from pkg/server/testing/fake_cni_plugin.go rename to pkg/cri/server/testing/fake_cni_plugin.go diff --git a/pkg/server/update_runtime_config.go b/pkg/cri/server/update_runtime_config.go similarity index 100% rename from pkg/server/update_runtime_config.go rename to pkg/cri/server/update_runtime_config.go diff --git a/pkg/server/update_runtime_config_test.go b/pkg/cri/server/update_runtime_config_test.go similarity index 96% rename from pkg/server/update_runtime_config_test.go rename to pkg/cri/server/update_runtime_config_test.go index 1bb45d5bd..ad01c5fc3 100644 --- a/pkg/server/update_runtime_config_test.go +++ b/pkg/cri/server/update_runtime_config_test.go @@ -28,8 +28,8 @@ import ( "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - criconfig "github.com/containerd/containerd/pkg/config" - servertesting "github.com/containerd/containerd/pkg/server/testing" + criconfig "github.com/containerd/containerd/pkg/cri/config" + servertesting "github.com/containerd/containerd/pkg/cri/server/testing" ) func TestUpdateRuntimeConfig(t *testing.T) { diff --git a/pkg/server/version.go b/pkg/cri/server/version.go similarity index 100% rename from pkg/server/version.go rename to pkg/cri/server/version.go diff --git a/pkg/store/container/container.go b/pkg/cri/store/container/container.go similarity index 96% rename from pkg/store/container/container.go rename to pkg/cri/store/container/container.go index 1b75113a5..297980ebe 100644 --- a/pkg/store/container/container.go +++ b/pkg/cri/store/container/container.go @@ -20,12 +20,12 @@ import ( "sync" "github.com/containerd/containerd" - "github.com/containerd/containerd/pkg/store/label" + "github.com/containerd/containerd/pkg/cri/store/label" "github.com/docker/docker/pkg/truncindex" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - cio "github.com/containerd/containerd/pkg/server/io" - "github.com/containerd/containerd/pkg/store" + cio "github.com/containerd/containerd/pkg/cri/io" + "github.com/containerd/containerd/pkg/cri/store" ) // Container contains all resources associated with the container. All methods to diff --git a/pkg/store/container/container_test.go b/pkg/cri/store/container/container_test.go similarity index 97% rename from pkg/store/container/container_test.go rename to pkg/cri/store/container/container_test.go index 9ab264b37..2a658579a 100644 --- a/pkg/store/container/container_test.go +++ b/pkg/cri/store/container/container_test.go @@ -21,13 +21,13 @@ import ( "testing" "time" - "github.com/containerd/containerd/pkg/store/label" + "github.com/containerd/containerd/pkg/cri/store/label" "github.com/opencontainers/selinux/go-selinux" assertlib "github.com/stretchr/testify/assert" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - cio "github.com/containerd/containerd/pkg/server/io" - "github.com/containerd/containerd/pkg/store" + cio "github.com/containerd/containerd/pkg/cri/io" + "github.com/containerd/containerd/pkg/cri/store" ) func TestContainerStore(t *testing.T) { diff --git a/pkg/store/container/fake_status.go b/pkg/cri/store/container/fake_status.go similarity index 100% rename from pkg/store/container/fake_status.go rename to pkg/cri/store/container/fake_status.go diff --git a/pkg/store/container/metadata.go b/pkg/cri/store/container/metadata.go similarity index 100% rename from pkg/store/container/metadata.go rename to pkg/cri/store/container/metadata.go diff --git a/pkg/store/container/metadata_test.go b/pkg/cri/store/container/metadata_test.go similarity index 100% rename from pkg/store/container/metadata_test.go rename to pkg/cri/store/container/metadata_test.go diff --git a/pkg/store/container/status.go b/pkg/cri/store/container/status.go similarity index 100% rename from pkg/store/container/status.go rename to pkg/cri/store/container/status.go diff --git a/pkg/store/container/status_test.go b/pkg/cri/store/container/status_test.go similarity index 100% rename from pkg/store/container/status_test.go rename to pkg/cri/store/container/status_test.go diff --git a/pkg/store/errors.go b/pkg/cri/store/errors.go similarity index 100% rename from pkg/store/errors.go rename to pkg/cri/store/errors.go diff --git a/pkg/store/errors_test.go b/pkg/cri/store/errors_test.go similarity index 100% rename from pkg/store/errors_test.go rename to pkg/cri/store/errors_test.go diff --git a/pkg/store/image/fake_image.go b/pkg/cri/store/image/fake_image.go similarity index 100% rename from pkg/store/image/fake_image.go rename to pkg/cri/store/image/fake_image.go diff --git a/pkg/store/image/image.go b/pkg/cri/store/image/image.go similarity index 99% rename from pkg/store/image/image.go rename to pkg/cri/store/image/image.go index cb70701c3..7030732e8 100644 --- a/pkg/store/image/image.go +++ b/pkg/cri/store/image/image.go @@ -30,7 +30,7 @@ import ( imagespec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" - storeutil "github.com/containerd/containerd/pkg/store" + storeutil "github.com/containerd/containerd/pkg/cri/store" "github.com/containerd/containerd/pkg/util" ) diff --git a/pkg/store/image/image_test.go b/pkg/cri/store/image/image_test.go similarity index 99% rename from pkg/store/image/image_test.go rename to pkg/cri/store/image/image_test.go index 5f5fcc2d2..880ad0dc3 100644 --- a/pkg/store/image/image_test.go +++ b/pkg/cri/store/image/image_test.go @@ -24,7 +24,7 @@ import ( "github.com/opencontainers/go-digest/digestset" assertlib "github.com/stretchr/testify/assert" - storeutil "github.com/containerd/containerd/pkg/store" + storeutil "github.com/containerd/containerd/pkg/cri/store" ) func TestInternalStore(t *testing.T) { diff --git a/pkg/store/label/label.go b/pkg/cri/store/label/label.go similarity index 100% rename from pkg/store/label/label.go rename to pkg/cri/store/label/label.go diff --git a/pkg/store/label/label_test.go b/pkg/cri/store/label/label_test.go similarity index 100% rename from pkg/store/label/label_test.go rename to pkg/cri/store/label/label_test.go diff --git a/pkg/store/sandbox/metadata.go b/pkg/cri/store/sandbox/metadata.go similarity index 100% rename from pkg/store/sandbox/metadata.go rename to pkg/cri/store/sandbox/metadata.go diff --git a/pkg/store/sandbox/metadata_test.go b/pkg/cri/store/sandbox/metadata_test.go similarity index 100% rename from pkg/store/sandbox/metadata_test.go rename to pkg/cri/store/sandbox/metadata_test.go diff --git a/pkg/store/sandbox/sandbox.go b/pkg/cri/store/sandbox/sandbox.go similarity index 97% rename from pkg/store/sandbox/sandbox.go rename to pkg/cri/store/sandbox/sandbox.go index 3dc2029dd..16f069828 100644 --- a/pkg/store/sandbox/sandbox.go +++ b/pkg/cri/store/sandbox/sandbox.go @@ -20,11 +20,11 @@ import ( "sync" "github.com/containerd/containerd" - "github.com/containerd/containerd/pkg/store/label" + "github.com/containerd/containerd/pkg/cri/store/label" "github.com/docker/docker/pkg/truncindex" + "github.com/containerd/containerd/pkg/cri/store" "github.com/containerd/containerd/pkg/netns" - "github.com/containerd/containerd/pkg/store" ) // Sandbox contains all resources associated with the sandbox. All methods to diff --git a/pkg/store/sandbox/sandbox_test.go b/pkg/cri/store/sandbox/sandbox_test.go similarity index 97% rename from pkg/store/sandbox/sandbox_test.go rename to pkg/cri/store/sandbox/sandbox_test.go index eff3bb612..b26de24a2 100644 --- a/pkg/store/sandbox/sandbox_test.go +++ b/pkg/cri/store/sandbox/sandbox_test.go @@ -19,11 +19,11 @@ package sandbox import ( "testing" - "github.com/containerd/containerd/pkg/store/label" + "github.com/containerd/containerd/pkg/cri/store/label" assertlib "github.com/stretchr/testify/assert" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "github.com/containerd/containerd/pkg/store" + "github.com/containerd/containerd/pkg/cri/store" ) func TestSandboxStore(t *testing.T) { diff --git a/pkg/store/sandbox/status.go b/pkg/cri/store/sandbox/status.go similarity index 100% rename from pkg/store/sandbox/status.go rename to pkg/cri/store/sandbox/status.go diff --git a/pkg/store/sandbox/status_test.go b/pkg/cri/store/sandbox/status_test.go similarity index 100% rename from pkg/store/sandbox/status_test.go rename to pkg/cri/store/sandbox/status_test.go diff --git a/pkg/store/snapshot/snapshot.go b/pkg/cri/store/snapshot/snapshot.go similarity index 97% rename from pkg/store/snapshot/snapshot.go rename to pkg/cri/store/snapshot/snapshot.go index 206f5f7b2..1e3629826 100644 --- a/pkg/store/snapshot/snapshot.go +++ b/pkg/cri/store/snapshot/snapshot.go @@ -21,7 +21,7 @@ import ( snapshot "github.com/containerd/containerd/snapshots" - "github.com/containerd/containerd/pkg/store" + "github.com/containerd/containerd/pkg/cri/store" ) // Snapshot contains the information about the snapshot. diff --git a/pkg/store/snapshot/snapshot_test.go b/pkg/cri/store/snapshot/snapshot_test.go similarity index 97% rename from pkg/store/snapshot/snapshot_test.go rename to pkg/cri/store/snapshot/snapshot_test.go index eff909d94..de263fdb4 100644 --- a/pkg/store/snapshot/snapshot_test.go +++ b/pkg/cri/store/snapshot/snapshot_test.go @@ -23,7 +23,7 @@ import ( snapshot "github.com/containerd/containerd/snapshots" assertlib "github.com/stretchr/testify/assert" - "github.com/containerd/containerd/pkg/store" + "github.com/containerd/containerd/pkg/cri/store" ) func TestSnapshotStore(t *testing.T) { diff --git a/pkg/store/util.go b/pkg/cri/store/util.go similarity index 100% rename from pkg/store/util.go rename to pkg/cri/store/util.go