Snapshotters: Export the root path
Some of the snapshotters that allow you to change their root location were already doing this, this just makes all of them follow the same pattern. Signed-off-by: Danny Canter <danny@dcantah.dev>
This commit is contained in:
parent
8eb03f17b1
commit
32caaee484
@ -74,6 +74,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
opts = append(opts, blockfile.WithRecreateScratch(config.RecreateScratch))
|
opts = append(opts, blockfile.WithRecreateScratch(config.RecreateScratch))
|
||||||
|
|
||||||
|
ic.Meta.Exports[plugins.SnapshotterRootDir] = root
|
||||||
return blockfile.NewSnapshotter(root, opts...)
|
return blockfile.NewSnapshotter(root, opts...)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -54,7 +54,7 @@ func init() {
|
|||||||
root = config.RootPath
|
root = config.RootPath
|
||||||
}
|
}
|
||||||
|
|
||||||
ic.Meta.Exports = map[string]string{"root": root}
|
ic.Meta.Exports[plugins.SnapshotterRootDir] = root
|
||||||
return btrfs.NewSnapshotter(root)
|
return btrfs.NewSnapshotter(root)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -50,6 +50,7 @@ func init() {
|
|||||||
config.RootPath = ic.Properties[plugins.PropertyRootDir]
|
config.RootPath = ic.Properties[plugins.PropertyRootDir]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ic.Meta.Exports[plugins.SnapshotterRootDir] = config.RootPath
|
||||||
return devmapper.NewSnapshotter(ic.Context, config)
|
return devmapper.NewSnapshotter(ic.Context, config)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -50,6 +50,7 @@ func init() {
|
|||||||
root = config.RootPath
|
root = config.RootPath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ic.Meta.Exports[plugins.SnapshotterRootDir] = root
|
||||||
return native.NewSnapshotter(root)
|
return native.NewSnapshotter(root)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -92,7 +92,7 @@ func init() {
|
|||||||
ic.Meta.Capabilities = append(ic.Meta.Capabilities, capaOnlyRemapIDs)
|
ic.Meta.Capabilities = append(ic.Meta.Capabilities, capaOnlyRemapIDs)
|
||||||
}
|
}
|
||||||
|
|
||||||
ic.Meta.Exports["root"] = root
|
ic.Meta.Exports[plugins.SnapshotterRootDir] = root
|
||||||
return overlay.NewSnapshotter(root, oOpts...)
|
return overlay.NewSnapshotter(root, oOpts...)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -93,3 +93,7 @@ const (
|
|||||||
// PropertyTTRPCAddress is the ttrpc address used for client connections to containerd
|
// PropertyTTRPCAddress is the ttrpc address used for client connections to containerd
|
||||||
PropertyTTRPCAddress = "io.containerd.plugin.ttrpc.address"
|
PropertyTTRPCAddress = "io.containerd.plugin.ttrpc.address"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
SnapshotterRootDir = "root"
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user