mirror of
https://github.com/containers/podman.git
synced 2026-10-24 02:39:13 -04:00
implement init containers in podman
this is the first pass at implementing init containers for podman pods. init containersare made popular by k8s as a way to run setup for pods before the pods standard containers run. unlike k8s, we support two styles of init containers: always and oneshot. always means the container stays in the pod and starts whenever a pod is started. this does not apply to pods restarting. oneshot means the container runs onetime when the pod starts and then is removed. Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
1 parent
e93661f5e7
commit
3c3fa6fac4
16 files changed
+366
-20
No files matched your search
@@ -447,6 +447,21 @@ content that disappears when the container is stopped.
|
||||
|
||||
Run an init inside the container that forwards signals and reaps processes.
|
||||
|
||||
#### **--init-ctr**=*type* (pods only)
|
||||
|
||||
When using pods, create an init style container, which is run after the infra container is started
|
||||
but before regular pod containers are started. Init containers are useful for running
|
||||
setup operations for the pod's applications.
|
||||
|
||||
Valid values for `init-ctr` type are *always* or *oneshot*. The *always* value
|
||||
means the container will run with each and every `pod start`, whereas the *oneshot*
|
||||
value means is will ony run once when the pod is started and then the container is
|
||||
removed.
|
||||
|
||||
Init containers are only run on pod `start`. Restarting a pod will not execute any init
|
||||
containers should they be present. Furthermore, init containers can only be created in a
|
||||
pod when that pod is not running.
|
||||
|
||||
#### **--init-path**=*path*
|
||||
|
||||
Path to the container-init binary.
|
||||
|
||||
Reference in new issue
Block a user