summaryrefslogtreecommitdiff
path: root/pkg/specgen/specgen.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-22 23:27:07 +0200
committerGitHub <noreply@github.com>2020-04-22 23:27:07 +0200
commitbf1e5b875f365cc42cfd2a88fbe7e577e05a49f7 (patch)
tree1849329a38aaee36982abe4ded325f39c3263b59 /pkg/specgen/specgen.go
parent142757bd7288ccdb88d8f1322932f999ffb18c02 (diff)
parentb4a4338dfe684dea1e919af1bec24a83708c1525 (diff)
downloadpodman-bf1e5b875f365cc42cfd2a88fbe7e577e05a49f7.tar.gz
podman-bf1e5b875f365cc42cfd2a88fbe7e577e05a49f7.tar.bz2
podman-bf1e5b875f365cc42cfd2a88fbe7e577e05a49f7.zip
Merge pull request #5942 from mheon/volume_flags
Enable basic volumes support in Podmanv2
Diffstat (limited to 'pkg/specgen/specgen.go')
-rw-r--r--pkg/specgen/specgen.go17
1 files changed, 12 insertions, 5 deletions
diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go
index e102a3234..37f2b3190 100644
--- a/pkg/specgen/specgen.go
+++ b/pkg/specgen/specgen.go
@@ -171,7 +171,7 @@ type ContainerStorageConfig struct {
// These will supersede Image Volumes and VolumesFrom volumes where
// there are conflicts.
// Optional.
- Volumes []*Volumes `json:"volumes,omitempty"`
+ Volumes []*NamedVolume `json:"volumes,omitempty"`
// Devices are devices that will be added to the container.
// Optional.
Devices []spec.LinuxDevice `json:"devices,omitempty"`
@@ -387,10 +387,17 @@ type SpecGenerator struct {
ContainerHealthCheckConfig
}
-// Volumes is a temporary struct to hold input from the User
-type Volumes struct {
- Name string
- Dest string
+// NamedVolume holds information about a named volume that will be mounted into
+// the container.
+type NamedVolume struct {
+ // Name is the name of the named volume to be mounted. May be empty.
+ // If empty, a new named volume with a pseudorandomly generated name
+ // will be mounted at the given destination.
+ Name string
+ // Destination to mount the named volume within the container. Must be
+ // an absolute path. Path will be created if it does not exist.
+ Dest string
+ // Options are options that the named volume will be mounted with.
Options []string
}