summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorcdoern <cdoern@redhat.com>2022-01-18 15:46:11 -0500
committerMatthew Heon <matthew.heon@pm.me>2022-02-10 13:49:46 -0500
commitb1bf91a22a8d5d4d676e48efa2073944baff14c1 (patch)
tree66bac7f10ddc1d85c847573c1ad46c382b8c00dd /pkg/domain
parent85c0fe7dc086f89f958302b7fd0f5fe8103db441 (diff)
downloadpodman-b1bf91a22a8d5d4d676e48efa2073944baff14c1.tar.gz
podman-b1bf91a22a8d5d4d676e48efa2073944baff14c1.tar.bz2
podman-b1bf91a22a8d5d4d676e48efa2073944baff14c1.zip
Podman pod create --share-parent vs --share=cgroup
separated cgroupNS sharing from setting the pod as the cgroup parent, made a new flag --share-parent which sets the pod as the cgroup parent for all containers entering the pod remove cgroup from the default kernel namespaces since we want the same default behavior as before which is just the cgroup parent. resolves #12765 Signed-off-by: cdoern <cdoern@redhat.com> Signed-off-by: cdoern <cbdoer23@g.holycross.edu> Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/entities/pods.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go
index aeccc82b4..7922db4e6 100644
--- a/pkg/domain/entities/pods.go
+++ b/pkg/domain/entities/pods.go
@@ -132,6 +132,7 @@ type PodCreateOptions struct {
Name string `json:"name,omitempty"`
Net *NetOptions `json:"net,omitempty"`
Share []string `json:"share,omitempty"`
+ ShareParent *bool `json:"share_parent,omitempty"`
Pid string `json:"pid,omitempty"`
Cpus float64 `json:"cpus,omitempty"`
CpusetCpus string `json:"cpuset_cpus,omitempty"`
@@ -324,6 +325,7 @@ func ToPodSpecGen(s specgen.PodSpecGenerator, p *PodCreateOptions) (*specgen.Pod
}
s.InfraImage = p.InfraImage
s.SharedNamespaces = p.Share
+ s.ShareParent = p.ShareParent
s.PodCreateCommand = p.CreateCommand
s.VolumesFrom = p.VolumesFrom