summaryrefslogtreecommitdiff
path: root/cmd/podman/common.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-03-06 12:12:35 -0600
committerbaude <bbaude@redhat.com>2019-03-12 14:29:18 -0500
commit03716cf7f331fa5b5ffab23dcc863bedd66b5dfc (patch)
tree866b063270455a6cd0dc91d95e91cf1d3ca7b53d /cmd/podman/common.go
parent7038cac53c4c93cd088fdbb097eee8d45494c3b8 (diff)
downloadpodman-03716cf7f331fa5b5ffab23dcc863bedd66b5dfc.tar.gz
podman-03716cf7f331fa5b5ffab23dcc863bedd66b5dfc.tar.bz2
podman-03716cf7f331fa5b5ffab23dcc863bedd66b5dfc.zip
healtcheck phase 2
integration of healthcheck into create and run as well as inspect. healthcheck enhancements are as follows: * add the following options to create|run so that non-docker images can define healthchecks at the container level. * --healthcheck-command * --healthcheck-retries * --healthcheck-interval * --healthcheck-start-period * podman create|run --healthcheck-command=none disables healthcheck as described by an image. * the healthcheck itself and the healthcheck "history" can now be observed in podman inspect * added the wiring for healthcheck history which logs the health history of the container, the current failed streak attempts, and log entries for the last five attempts which themselves have start and stop times, result, and a 500 character truncated (if needed) log of stderr/stdout. The timings themselves are not implemented in this PR but will be in future enablement (i.e. next). Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/common.go')
-rw-r--r--cmd/podman/common.go21
1 files changed, 20 insertions, 1 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go
index 30eaa95d8..79b7495ab 100644
--- a/cmd/podman/common.go
+++ b/cmd/podman/common.go
@@ -287,7 +287,26 @@ func getCreateFlags(c *cliconfig.PodmanCommand) {
createFlags.Bool(
"help", false, "",
)
-
+ createFlags.String(
+ "healthcheck-command", "",
+ "set a healthcheck command for the container ('none' disables the existing healthcheck)",
+ )
+ createFlags.String(
+ "healthcheck-interval", "30s",
+ "set an interval for the healthchecks",
+ )
+ createFlags.Uint(
+ "healthcheck-retries", 3,
+ "the number of retries allowed before a healthcheck is considered to be unhealthy",
+ )
+ createFlags.String(
+ "healthcheck-start-period", "0s",
+ "the initialization time needed for a container to bootstrap",
+ )
+ createFlags.String(
+ "healthcheck-timeout", "30s",
+ "the maximum time allowed to complete the healthcheck before an interval is considered failed",
+ )
createFlags.StringP(
"hostname", "h", "",
"Set container hostname",