server: workaround images with Config.Volumes

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2017-05-22 17:19:49 +02:00
parent fb83c7e619
commit 02f3828283
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9
2 changed files with 28 additions and 0 deletions

View file

@ -589,6 +589,14 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID string,
containerImageConfig := containerInfo.Config
// TODO: volume handling in CRI-O
// right now, we do just mount tmpfs in order to have images like
// gcr.io/k8s-testimages/redis:e2e to work with CRI-O
for dest := range containerImageConfig.Config.Volumes {
destOptions := []string{"mode=1777", "size=" + strconv.Itoa(64*1024*1024)}
specgen.AddTmpfsMount(dest, destOptions)
}
processArgs, err := buildOCIProcessArgs(containerConfig, containerImageConfig)
if err != nil {
return nil, err