summaryrefslogtreecommitdiffhomepage
path: root/pkg/v1/utils/volumes.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-11-25 17:10:10 -0800
committerLantao Liu <lantaol@google.com>2019-11-25 17:10:10 -0800
commit67745b88e0ddcc44dcc7629be0334a7d970d6e09 (patch)
treeba2d07207b3dafca32b42285f5c619a9fe2f6e3b /pkg/v1/utils/volumes.go
parentf299b553afdd8455a0057862004061ea12e660f5 (diff)
Handle any volume type, not only tmpfs (#42)
Diffstat (limited to 'pkg/v1/utils/volumes.go')
-rw-r--r--pkg/v1/utils/volumes.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/pkg/v1/utils/volumes.go b/pkg/v1/utils/volumes.go
index cd27f6de5..02a70a8b6 100644
--- a/pkg/v1/utils/volumes.go
+++ b/pkg/v1/utils/volumes.go
@@ -117,10 +117,6 @@ func UpdateVolumeAnnotations(bundle string, s *specs.Spec) error {
if volumeFieldName(k) != "type" {
continue
}
- if v != "tmpfs" {
- // Only tmpfs is supported now.
- continue
- }
volume := volumeName(k)
if uid != "" {
// This is a sandbox
@@ -143,8 +139,8 @@ func UpdateVolumeAnnotations(bundle string, s *specs.Spec) error {
// more accurate matching.
if yes, _ := isVolumePath(volume, s.Mounts[i].Source); yes {
// gVisor requires the container mount type to match
- // sandbox mount type for tmpfs.
- s.Mounts[i].Type = "tmpfs"
+ // sandbox mount type.
+ s.Mounts[i].Type = v
updated = true
}
}