diff options
author | baude <bbaude@redhat.com> | 2019-02-26 20:54:57 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-03-05 14:03:55 -0600 |
commit | 598bde52d02eb82634c6b1fa357253f03120a4a0 (patch) | |
tree | 08c935792c9e1d57ee00f8db98b3f1a74987f4b6 /cmd/podman/healthcheck.go | |
parent | 645426fe797f90fc75712388e0373158f13bab0a (diff) | |
download | podman-598bde52d02eb82634c6b1fa357253f03120a4a0.tar.gz podman-598bde52d02eb82634c6b1fa357253f03120a4a0.tar.bz2 podman-598bde52d02eb82634c6b1fa357253f03120a4a0.zip |
podman healthcheck run (phase 1)
Add the ability to manually run a container's healthcheck command.
This is only the first phase of implementing the healthcheck.
Subsequent pull requests will deal with the exposing the results and
history of healthchecks as well as the scheduling.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/healthcheck.go')
-rw-r--r-- | cmd/podman/healthcheck.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cmd/podman/healthcheck.go b/cmd/podman/healthcheck.go new file mode 100644 index 000000000..e7cc125cc --- /dev/null +++ b/cmd/podman/healthcheck.go @@ -0,0 +1,25 @@ +package main + +import ( + "github.com/containers/libpod/cmd/podman/cliconfig" + "github.com/spf13/cobra" +) + +var healthcheckDescription = "Manage health checks on containers" +var healthcheckCommand = cliconfig.PodmanCommand{ + Command: &cobra.Command{ + Use: "healthcheck", + Short: "Manage Healthcheck", + Long: healthcheckDescription, + }, +} + +// Commands that are universally implemented +var healthcheckCommands []*cobra.Command + +func init() { + healthcheckCommand.AddCommand(healthcheckCommands...) + healthcheckCommand.AddCommand(getHealtcheckSubCommands()...) + healthcheckCommand.SetUsageTemplate(UsageTemplate()) + rootCmd.AddCommand(healthcheckCommand.Command) +} |