nit edits for Sidecar containers
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>pull/42447/head
parent
a0abc5b5c4
commit
de8c969241
|
@ -118,8 +118,9 @@ By default, init containers run and complete before the app containers are start
|
||||||
|
|
||||||
{{< feature-state for_k8s_version="v1.28" state="alpha" >}}
|
{{< feature-state for_k8s_version="v1.28" state="alpha" >}}
|
||||||
|
|
||||||
Enabling the [SidecarContainers feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
|
Enabling the `SidecarContainers` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
|
||||||
allows specifying a <code>restartPolicy=Always</code> to init containers, making sure they are
|
allows you to specify `restartPolicy: Always` for init containers.
|
||||||
|
Setting the `Always` restart policy ensures that the init containers where you set it are
|
||||||
kept running during the entire lifetime of the Pod.
|
kept running during the entire lifetime of the Pod.
|
||||||
See [Sidecar containers and restartPolicy](/docs/concepts/workloads/pods/init-containers/#sidecar-containers-and-restartpolicy)
|
See [Sidecar containers and restartPolicy](/docs/concepts/workloads/pods/init-containers/#sidecar-containers-and-restartpolicy)
|
||||||
for more details.
|
for more details.
|
||||||
|
|
|
@ -294,7 +294,7 @@ validation error is thrown for any container sharing a name with another.
|
||||||
{{< feature-state for_k8s_version="v1.28" state="alpha" >}}
|
{{< feature-state for_k8s_version="v1.28" state="alpha" >}}
|
||||||
|
|
||||||
Starting with Kubernetes 1.28 in alpha, a feature gate named `SidecarContainers`
|
Starting with Kubernetes 1.28 in alpha, a feature gate named `SidecarContainers`
|
||||||
allows to specify a `restartPolicy` for init containers which is independent of
|
allows you to specify a `restartPolicy` for init containers which is independent of
|
||||||
the Pod and other init containers. Container [probes](/docs/concepts/workloads/pods/pod-lifecycle/#types-of-probe)
|
the Pod and other init containers. Container [probes](/docs/concepts/workloads/pods/pod-lifecycle/#types-of-probe)
|
||||||
can also be added to control their lifecycle.
|
can also be added to control their lifecycle.
|
||||||
|
|
||||||
|
@ -309,9 +309,11 @@ Since these containers are defined as init containers, they benefit from the sam
|
||||||
ordering and sequential guarantees as other init containers, allowing them to
|
ordering and sequential guarantees as other init containers, allowing them to
|
||||||
be mixed with other init containers into complex Pod initialization flows.
|
be mixed with other init containers into complex Pod initialization flows.
|
||||||
|
|
||||||
The only difference is that they are not required to complete before the next
|
Compared to regular init containers, sidecar-style init containers continue to
|
||||||
init container starts, so a next init container will start after the current
|
run and the next init container can begin starting once the kubelet has set
|
||||||
container status has been set to `Pod.status.containerStatuses[id of container].started=true`
|
the `started` container status for the sidecar-style init container to true.
|
||||||
|
That status either becomes true because there is a process running in the
|
||||||
|
container and no startup probe defined, or
|
||||||
as a result of its `startupProbe` succeeding.
|
as a result of its `startupProbe` succeeding.
|
||||||
|
|
||||||
This feature can be used to implement the sidecar container pattern in a more
|
This feature can be used to implement the sidecar container pattern in a more
|
||||||
|
|
Loading…
Reference in New Issue