@@ -29,10 +29,8 @@ import (
|
||||
rootfsapi "github.com/containerd/containerd/api/services/rootfs"
|
||||
"github.com/containerd/containerd/content"
|
||||
"github.com/containerd/containerd/images"
|
||||
"github.com/containerd/containerd/rootfs"
|
||||
contentservice "github.com/containerd/containerd/services/content"
|
||||
imagesservice "github.com/containerd/containerd/services/images"
|
||||
rootfsservice "github.com/containerd/containerd/services/rootfs"
|
||||
|
||||
"github.com/kubernetes-incubator/cri-containerd/pkg/metadata"
|
||||
"github.com/kubernetes-incubator/cri-containerd/pkg/metadata/store"
|
||||
@@ -87,9 +85,8 @@ type criContainerdService struct {
|
||||
containerService execution.ContainerServiceClient
|
||||
// contentStoreService is the containerd content service client..
|
||||
contentStoreService content.Store
|
||||
// rootfsUnpacker is the containerd service to unpack image content
|
||||
// into snapshots.
|
||||
rootfsUnpacker rootfs.Unpacker
|
||||
// rootfsService is the containerd rootfs service client.
|
||||
rootfsService rootfsapi.RootFSClient
|
||||
// imageStoreService is the containerd service to store and track
|
||||
// image metadata.
|
||||
imageStoreService images.Store
|
||||
@@ -99,7 +96,6 @@ type criContainerdService struct {
|
||||
|
||||
// NewCRIContainerdService returns a new instance of CRIContainerdService
|
||||
func NewCRIContainerdService(conn *grpc.ClientConn, rootDir, networkPluginBinDir, networkPluginConfDir string) (CRIContainerdService, error) {
|
||||
// TODO: Initialize different containerd clients.
|
||||
// TODO(random-liu): [P2] Recover from runtime state and metadata store.
|
||||
c := &criContainerdService{
|
||||
os: osinterface.RealOS{},
|
||||
@@ -116,7 +112,7 @@ func NewCRIContainerdService(conn *grpc.ClientConn, rootDir, networkPluginBinDir
|
||||
containerService: execution.NewContainerServiceClient(conn),
|
||||
imageStoreService: imagesservice.NewStoreFromClient(imagesapi.NewImagesClient(conn)),
|
||||
contentStoreService: contentservice.NewStoreFromClient(contentapi.NewContentClient(conn)),
|
||||
rootfsUnpacker: rootfsservice.NewUnpackerFromClient(rootfsapi.NewRootFSClient(conn)),
|
||||
rootfsService: rootfsapi.NewRootFSClient(conn),
|
||||
}
|
||||
|
||||
netPlugin, err := ocicni.InitCNI(networkPluginBinDir, networkPluginConfDir)
|
||||
|
||||
Reference in New Issue
Block a user