*: export RemoveVolatileOption for CRI image volumes

Remove volatile option when CRI prepares image volumes.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
Wei Fu
2024-05-28 22:17:23 +08:00
parent eb8b3de9d3
commit 4123170a39
5 changed files with 93 additions and 7 deletions

View File

@@ -74,6 +74,7 @@ func WithVolumes(volumeMounts map[string]string, platform imagespec.Platform) co
if len(mounts) == 1 && mounts[0].Type == "overlay" {
mounts[0].Options = append(mounts[0].Options, "ro")
}
mounts = mount.RemoveVolatileOption(mounts)
root, err := os.MkdirTemp("", "ctd-volume")
if err != nil {