mirror of
https://github.com/containers/podman.git
synced 2025-05-20 16:47:39 +08:00
Add emptyDir volume support to kube play
When a kube yaml has a volume set as empty dir, podman will create an anonymous volume with the empty dir name and attach it to the containers running in the pod. When the pod is removed, the empy dir volume created is also removed. Add tests and docs for this as well. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
@ -1413,9 +1413,10 @@ func WithNamedVolumes(volumes []*ContainerNamedVolume) CtrCreateOption {
|
||||
}
|
||||
|
||||
ctr.config.NamedVolumes = append(ctr.config.NamedVolumes, &ContainerNamedVolume{
|
||||
Name: vol.Name,
|
||||
Dest: vol.Dest,
|
||||
Options: mountOpts,
|
||||
Name: vol.Name,
|
||||
Dest: vol.Dest,
|
||||
Options: mountOpts,
|
||||
IsAnonymous: vol.IsAnonymous,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user