mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-04-10 05:54:03 +00:00
kata-deploy: Complete containerd config for erofs snapshotter
Add missing containerd configuration items for erofs snapshotter to enable fsmerged erofs feature: - Add differ plugin configuration: - mkfs_options: ["-T0","--mkfs-time","--sort=none"] - enable_tar_index: false - Add snapshotter plugin configuration: - default_size: "10G" - max_unmerged_layers: 1 These configurations align with the documentation in docs/how-to/how-to-use-fsmerged-erofs-with-kata.md Step 2, ensuring the CI workflow run-k8s-tests-coco-nontee-with-erofs-snapshotter can properly configure containerd for erofs fsmerged rootfs. Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
This commit is contained in:
@@ -30,6 +30,20 @@ pub async fn configure_erofs_snapshotter(
|
||||
"[\"erofs\",\"walking\"]",
|
||||
)?;
|
||||
|
||||
//// Configure erofs differ plugin
|
||||
//// erofs-utils >= 1.8.2
|
||||
//toml_utils::set_toml_value(
|
||||
// configuration_file,
|
||||
// ".plugins.\"io.containerd.differ.v1.erofs\".mkfs_options",
|
||||
// "[\"-T0\",\"--mkfs-time\",\"--sort=none\"]",
|
||||
//)?;
|
||||
toml_utils::set_toml_value(
|
||||
configuration_file,
|
||||
".plugins.\"io.containerd.differ.v1.erofs\".enable_tar_index",
|
||||
"false",
|
||||
)?;
|
||||
|
||||
// Configure erofs snapshotter plugin
|
||||
toml_utils::set_toml_value(
|
||||
configuration_file,
|
||||
".plugins.\"io.containerd.snapshotter.v1.erofs\".enable_fsverity",
|
||||
@@ -40,6 +54,16 @@ pub async fn configure_erofs_snapshotter(
|
||||
".plugins.\"io.containerd.snapshotter.v1.erofs\".set_immutable",
|
||||
"true",
|
||||
)?;
|
||||
toml_utils::set_toml_value(
|
||||
configuration_file,
|
||||
".plugins.\"io.containerd.snapshotter.v1.erofs\".default_size",
|
||||
"\"10G\"",
|
||||
)?;
|
||||
toml_utils::set_toml_value(
|
||||
configuration_file,
|
||||
".plugins.\"io.containerd.snapshotter.v1.erofs\".max_unmerged_layers",
|
||||
"1",
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user