From 6da97c86314d8c80b912ba83db57fd26da19bfb7 Mon Sep 17 00:00:00 2001 From: cdoern Date: Wed, 1 Sep 2021 10:59:23 -0400 Subject: Pod Volumes From Support added support for a volumes from container. this flag just required movement of the volumes-from flag declaration out of the !IsInfra block, and minor modificaions to container_create.go Signed-off-by: cdoern --- pkg/domain/entities/pods.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/domain') diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go index 0356383ec..653f64b42 100644 --- a/pkg/domain/entities/pods.go +++ b/pkg/domain/entities/pods.go @@ -135,6 +135,7 @@ type PodCreateOptions struct { CpusetCpus string `json:"cpuset_cpus,omitempty"` Userns specgen.Namespace `json:"-"` Volume []string `json:"volume,omitempty"` + VolumesFrom []string `json:"volumes_from,omitempty"` } // PodLogsOptions describes the options to extract pod logs. @@ -251,7 +252,7 @@ type ContainerCreateOptions struct { UTS string Mount []string Volume []string `json:"volume,omitempty"` - VolumesFrom []string + VolumesFrom []string `json:"volumes_from,omitempty"` Workdir string SeccompPolicy string PidFile string @@ -308,6 +309,7 @@ func ToPodSpecGen(s specgen.PodSpecGenerator, p *PodCreateOptions) (*specgen.Pod s.InfraImage = p.InfraImage s.SharedNamespaces = p.Share s.PodCreateCommand = p.CreateCommand + s.VolumesFrom = p.VolumesFrom // Networking config -- cgit v1.2.3-54-g00ecf