Merge pull request #10073 from dcantah/snapshotters-root-export

Snapshotters: Export the root path
This commit is contained in:
Samuel Karp 2024-04-15 07:31:09 +00:00 committed by GitHub
commit 8317959018
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 9 additions and 2 deletions

View File

@ -74,6 +74,7 @@ func init() {
}
opts = append(opts, blockfile.WithRecreateScratch(config.RecreateScratch))
ic.Meta.Exports[plugins.SnapshotterRootDir] = root
return blockfile.NewSnapshotter(root, opts...)
},
})

View File

@ -54,7 +54,7 @@ func init() {
root = config.RootPath
}
ic.Meta.Exports = map[string]string{"root": root}
ic.Meta.Exports[plugins.SnapshotterRootDir] = root
return btrfs.NewSnapshotter(root)
},
})

View File

@ -50,6 +50,7 @@ func init() {
config.RootPath = ic.Properties[plugins.PropertyRootDir]
}
ic.Meta.Exports[plugins.SnapshotterRootDir] = config.RootPath
return devmapper.NewSnapshotter(ic.Context, config)
},
})

View File

@ -50,6 +50,7 @@ func init() {
root = config.RootPath
}
ic.Meta.Exports[plugins.SnapshotterRootDir] = root
return native.NewSnapshotter(root)
},
})

View File

@ -92,7 +92,7 @@ func init() {
ic.Meta.Capabilities = append(ic.Meta.Capabilities, capaOnlyRemapIDs)
}
ic.Meta.Exports["root"] = root
ic.Meta.Exports[plugins.SnapshotterRootDir] = root
return overlay.NewSnapshotter(root, oOpts...)
},
})

View File

@ -93,3 +93,7 @@ const (
// PropertyTTRPCAddress is the ttrpc address used for client connections to containerd
PropertyTTRPCAddress = "io.containerd.plugin.ttrpc.address"
)
const (
SnapshotterRootDir = "root"
)