*: CRIImageService should delete image synchronously
Use memory service instead of metadata store. Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
parent
148fbbb92f
commit
091143135b
@ -73,13 +73,12 @@ func init() {
|
|||||||
|
|
||||||
options := &images.CRIImageServiceOptions{
|
options := &images.CRIImageServiceOptions{
|
||||||
Content: mdb.ContentStore(),
|
Content: mdb.ContentStore(),
|
||||||
Images: metadata.NewImageStore(mdb),
|
|
||||||
RuntimePlatforms: map[string]images.ImagePlatform{},
|
RuntimePlatforms: map[string]images.ImagePlatform{},
|
||||||
Snapshotters: map[string]snapshots.Snapshotter{},
|
Snapshotters: map[string]snapshots.Snapshotter{},
|
||||||
ImageFSPaths: map[string]string{},
|
ImageFSPaths: map[string]string{},
|
||||||
}
|
}
|
||||||
|
|
||||||
options.Client, err = containerd.New(
|
ctrdCli, err := containerd.New(
|
||||||
"",
|
"",
|
||||||
containerd.WithDefaultNamespace(constants.K8sContainerdNamespace),
|
containerd.WithDefaultNamespace(constants.K8sContainerdNamespace),
|
||||||
containerd.WithDefaultPlatform(platforms.Default()),
|
containerd.WithDefaultPlatform(platforms.Default()),
|
||||||
@ -88,6 +87,8 @@ func init() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to init client for cri image service: %w", err)
|
return nil, fmt.Errorf("unable to init client for cri image service: %w", err)
|
||||||
}
|
}
|
||||||
|
options.Images = ctrdCli.ImageService()
|
||||||
|
options.Client = ctrdCli
|
||||||
|
|
||||||
allSnapshotters := mdb.Snapshotters()
|
allSnapshotters := mdb.Snapshotters()
|
||||||
defaultSnapshotter := config.Snapshotter
|
defaultSnapshotter := config.Snapshotter
|
||||||
|
Loading…
Reference in New Issue
Block a user