diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-23 12:21:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-23 12:21:55 -0500 |
commit | eef9875a6133d4cbf4e6f63771dd86045f071f7d (patch) | |
tree | 46c50c1a5b85e6f558bdd82f13b934ed802bfb60 /cmd/podman/shared | |
parent | 9fd01e19458bd8c8281663bdb504f02aa3a92e3b (diff) | |
parent | 0184714a82696feec33b383bfd98875712173e6e (diff) | |
download | podman-eef9875a6133d4cbf4e6f63771dd86045f071f7d.tar.gz podman-eef9875a6133d4cbf4e6f63771dd86045f071f7d.tar.bz2 podman-eef9875a6133d4cbf4e6f63771dd86045f071f7d.zip |
Merge pull request #5300 from baude/disablehealth
Add --no-healthcheck command to create/run
Diffstat (limited to 'cmd/podman/shared')
-rw-r--r-- | cmd/podman/shared/create.go | 5 | ||||
-rw-r--r-- | cmd/podman/shared/intermediate.go | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go index 5b244699c..0814eeba3 100644 --- a/cmd/podman/shared/create.go +++ b/cmd/podman/shared/create.go @@ -120,12 +120,13 @@ func CreateContainer(ctx context.Context, c *GenericCLIResults, runtime *libpod. imageName = newImage.ID() } - // if the user disabled the healthcheck with "none", we skip adding it + // if the user disabled the healthcheck with "none" or the no-healthcheck + // options is provided, we skip adding it healthCheckCommandInput := c.String("healthcheck-command") // the user didn't disable the healthcheck but did pass in a healthcheck command // now we need to make a healthcheck from the commandline input - if healthCheckCommandInput != "none" { + if healthCheckCommandInput != "none" && !c.Bool("no-healthcheck") { if len(healthCheckCommandInput) > 0 { healthCheck, err = makeHealthCheckFromCli(c) if err != nil { diff --git a/cmd/podman/shared/intermediate.go b/cmd/podman/shared/intermediate.go index ee212234f..e76750042 100644 --- a/cmd/podman/shared/intermediate.go +++ b/cmd/podman/shared/intermediate.go @@ -425,6 +425,7 @@ func NewIntermediateLayer(c *cliconfig.PodmanCommand, remote bool) GenericCLIRes m["memory-swappiness"] = newCRInt64(c, "memory-swappiness") m["name"] = newCRString(c, "name") m["network"] = newCRString(c, "network") + m["no-healthcheck"] = newCRBool(c, "no-healthcheck") m["no-hosts"] = newCRBool(c, "no-hosts") m["oom-kill-disable"] = newCRBool(c, "oom-kill-disable") m["oom-score-adj"] = newCRInt(c, "oom-score-adj") |