Skip to content

Commit a6cb3db

Browse files
committed
image: generator: create tmpfs mounts for volumes
Signed-off-by: Aleksa Sarai <[email protected]>
1 parent 0b527f5 commit a6cb3db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

image/generator/runtime.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@ func MutateRuntimeSpec(g rgen.Generator, rootfs string, image v1.Image) error {
107107
g.SetLinuxResourcesMemorySwap(uint64(image.Config.MemorySwap))
108108

109109
for vol := range image.Config.Volumes {
110-
// XXX: Is it fine to generate source=""?
111-
g.AddBindMount("", vol, []string{"rw", "rbind"})
110+
// XXX: This is _fine_ but might cause some issues in the future.
111+
g.AddTmpfsMount(vol, []string{"rw"})
112112
}
113113

114+
// TODO: Handle annotations (both manifest and config annotations).
115+
114116
return nil
115117
}

0 commit comments

Comments
 (0)