summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-06 17:15:26 -0400
committerGitHub <noreply@github.com>2020-07-06 17:15:26 -0400
commit1a93857acc4ee1e5a9213e2c22f12802d84cd277 (patch)
treed3f8c923e0750fa4aa5ed423dca52640a8ff187c /cmd/podman
parentb1cc781c68964dff3ee4a00ef7ce71f56ae69e7c (diff)
parent10ad46eb7377ff504a65783a7a604b248b50f20a (diff)
downloadpodman-1a93857acc4ee1e5a9213e2c22f12802d84cd277.tar.gz
podman-1a93857acc4ee1e5a9213e2c22f12802d84cd277.tar.bz2
podman-1a93857acc4ee1e5a9213e2c22f12802d84cd277.zip
Merge pull request #6693 from goochjj/libpod-sd-notify-cmdline
Implement --sdnotify cmdline option to control sd-notify behavior
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/common/create.go6
-rw-r--r--cmd/podman/common/create_opts.go1
-rw-r--r--cmd/podman/common/specgen.go1
3 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index bbe31d19f..f6fbe8e10 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -6,6 +6,7 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/libpod/v2/cmd/podman/registry"
+ "github.com/containers/libpod/v2/libpod/define"
"github.com/spf13/pflag"
)
@@ -394,6 +395,11 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
"rootfs", false,
"The first argument is not an image but the rootfs to the exploded container",
)
+ createFlags.StringVar(
+ &cf.SdNotifyMode,
+ "sdnotify", define.SdNotifyModeContainer,
+ `control sd-notify behavior ("container"|"conmon"|"ignore")`,
+ )
createFlags.StringArrayVar(
&cf.SecurityOpt,
"security-opt", containerConfig.SecurityOptions(),
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index 3183a5cce..eafe7f090 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -81,6 +81,7 @@ type ContainerCLIOpts struct {
Rm bool
RootFS bool
SecurityOpt []string
+ SdNotifyMode string
ShmSize string
StopSignal string
StopTimeout uint
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index 225370368..0948e78f1 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -443,6 +443,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
}
s.Systemd = c.Systemd
+ s.SdNotifyMode = c.SdNotifyMode
if s.ResourceLimits == nil {
s.ResourceLimits = &specs.LinuxResources{}
}