From aad29e759c78b415a3b0393d7aba2bddbbc0cd3e Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 7 Sep 2022 11:45:30 +0200 Subject: health check: add on-failure actions For systems that have extreme robustness requirements (edge devices, particularly those in difficult to access environments), it is important that applications continue running in all circumstances. When the application fails, Podman must restart it automatically to provide this robustness. Otherwise, these devices may require customer IT to physically gain access to restart, which can be prohibitively difficult. Add a new `--on-failure` flag that supports four actions: - **none**: Take no action. - **kill**: Kill the container. - **restart**: Restart the container. Do not combine the `restart` action with the `--restart` flag. When running inside of a systemd unit, consider using the `kill` or `stop` action instead to make use of systemd's restart policy. - **stop**: Stop the container. To remain backwards compatible, **none** is the default action. Signed-off-by: Valentin Rothberg --- pkg/domain/entities/pods.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/domain/entities') diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go index 55e2fd574..a059cd7b5 100644 --- a/pkg/domain/entities/pods.go +++ b/pkg/domain/entities/pods.go @@ -212,6 +212,7 @@ type ContainerCreateOptions struct { HealthRetries uint HealthStartPeriod string HealthTimeout string + HealthOnFailure string Hostname string `json:"hostname,omitempty"` HTTPProxy bool HostUsers []string -- cgit v1.2.3-54-g00ecf