diff options
author | Urvashi Mohnani <umohnani@redhat.com> | 2022-07-24 19:44:41 -0400 |
---|---|---|
committer | Urvashi Mohnani <umohnani@redhat.com> | 2022-08-30 10:34:45 -0400 |
commit | 98169c20ddc09d8fa14d556e93cad3259b5ccca9 (patch) | |
tree | 693394b009dcd1b81425dcf5a8f9474ed333409a /pkg/specgen/volumes.go | |
parent | 57441b4c7127b30d9327cb4dfa189c8b9fc33ac5 (diff) | |
download | podman-98169c20ddc09d8fa14d556e93cad3259b5ccca9.tar.gz podman-98169c20ddc09d8fa14d556e93cad3259b5ccca9.tar.bz2 podman-98169c20ddc09d8fa14d556e93cad3259b5ccca9.zip |
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>
Diffstat (limited to 'pkg/specgen/volumes.go')
-rw-r--r-- | pkg/specgen/volumes.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/specgen/volumes.go b/pkg/specgen/volumes.go index 84de4fdd1..e70ed5b13 100644 --- a/pkg/specgen/volumes.go +++ b/pkg/specgen/volumes.go @@ -23,6 +23,9 @@ type NamedVolume struct { Dest string // Options are options that the named volume will be mounted with. Options []string + // IsAnonymous sets the named volume as anonymous even if it has a name + // This is used for emptyDir volumes from a kube yaml + IsAnonymous bool } // OverlayVolume holds information about a overlay volume that will be mounted into |