spiegel_podman/pkg/specgen
Valentin Rothberg 4eff0c8cf2 pod: add exit policies
Add the notion of an "exit policy" to a pod.  This policy controls the
behaviour when the last container of pod exits.  Initially, there are
two policies:

 - "continue" : the pod continues running. This is the default policy
                when creating a pod.

 - "stop" : stop the pod when the last container exits. This is the
            default behaviour for `play kube`.

In order to implement the deferred stop of a pod, add a worker queue to
the libpod runtime.  The queue will pick up work items and in this case
helps resolve dead locks that would otherwise occur if we attempted to
stop a pod during container cleanup.

Note that the default restart policy of `play kube` is "Always".  Hence,
in order to really solve #13464, the YAML files must set a custom
restart policy; the tests use "OnFailure".

Fixes: #13464
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-05-02 13:29:59 +02:00
..
generate pod: add exit policies 2022-05-02 13:29:59 +02:00
config_unsupported.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
container_validate.go enable gocritic linter 2022-04-26 18:12:22 +02:00
namespaces.go Merge pull request #13973 from Luap99/linter-revive 2022-04-23 06:32:41 -04:00
namespaces_test.go bump go module to version 4 2022-01-18 12:47:07 +01:00
pod_validate.go bump go module to version 4 2022-01-18 12:47:07 +01:00
podspecgen.go pod: add exit policies 2022-05-02 13:29:59 +02:00
specgen.go run, create: add --passwd-entry 2022-04-14 11:22:13 +02:00
specgen_test.go fix test 2021-10-11 17:41:58 +08:00
volumes.go Implements Windows volume/mount support 2022-04-25 13:52:27 -05:00
winpath.go enable gocritic linter 2022-04-26 18:12:22 +02:00
winpath_linux.go Implements Windows volume/mount support 2022-04-25 13:52:27 -05:00
winpath_unsupported.go Implements Windows volume/mount support 2022-04-25 13:52:27 -05:00
winpath_windows.go Implements Windows volume/mount support 2022-04-25 13:52:27 -05:00