summaryrefslogtreecommitdiff
path: root/pkg/k8s.io
diff options
context:
space:
mode:
authorUrvashi Mohnani <umohnani@redhat.com>2022-07-24 19:44:41 -0400
committerUrvashi Mohnani <umohnani@redhat.com>2022-08-30 10:34:45 -0400
commit98169c20ddc09d8fa14d556e93cad3259b5ccca9 (patch)
tree693394b009dcd1b81425dcf5a8f9474ed333409a /pkg/k8s.io
parent57441b4c7127b30d9327cb4dfa189c8b9fc33ac5 (diff)
downloadpodman-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/k8s.io')
-rw-r--r--pkg/k8s.io/api/core/v1/types.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/k8s.io/api/core/v1/types.go b/pkg/k8s.io/api/core/v1/types.go
index 384965769..d47178878 100644
--- a/pkg/k8s.io/api/core/v1/types.go
+++ b/pkg/k8s.io/api/core/v1/types.go
@@ -58,6 +58,10 @@ type VolumeSource struct {
ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"`
// Secret represents a secret that should be mounted as a volume
Secret *SecretVolumeSource `json:"secret,omitempty"`
+ // emptyDir represents a temporary directory that shares a pod's lifetime.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ // +optional
+ EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty"`
}
// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.