Skip to content

Commit

Permalink
modifying docs for SidecarContainers beta graduation
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
  • Loading branch information
matthyx committed Nov 12, 2023
1 parent a83b56d commit 755dec3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
4 changes: 2 additions & 2 deletions content/en/docs/concepts/workloads/pods/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ Some Pods have {{< glossary_tooltip text="init containers" term_id="init-contain
as well as {{< glossary_tooltip text="app containers" term_id="app-container" >}}.
By default, init containers run and complete before the app containers are started.

{{< feature-state for_k8s_version="v1.28" state="alpha" >}}
{{< feature-state for_k8s_version="v1.29" state="beta" >}}

Enabling the `SidecarContainers` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
Enabled by default, the `SidecarContainers` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
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.
Expand Down
6 changes: 3 additions & 3 deletions content/en/docs/concepts/workloads/pods/init-containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ validation error is thrown for any container sharing a name with another.

#### API for sidecar containers

{{< feature-state for_k8s_version="v1.28" state="alpha" >}}
{{< feature-state for_k8s_version="v1.29" state="beta" >}}

Starting with Kubernetes 1.28 in alpha, a feature gate named `SidecarContainers`
Enabled by default with Kubernetes 1.29, a feature gate named `SidecarContainers`
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)
can also be added to control their lifecycle.
Expand Down Expand Up @@ -376,4 +376,4 @@ Kubernetes, consult the documentation for the version you are using.
* Read about [creating a Pod that has an init container](/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container)
* Learn how to [debug init containers](/docs/tasks/debug/debug-application/debug-init-containers/)
* Read about an overview of [kubelet](/docs/reference/command-line-tools-reference/kubelet/) and [kubectl](/docs/reference/kubectl/)
* Learn about the [types of probes](/docs/concepts/workloads/pods/pod-lifecycle/#types-of-probe): liveness, readiness, startup probe.
* Learn about the [types of probes](/docs/concepts/workloads/pods/pod-lifecycle/#types-of-probe): liveness, readiness, startup probe.
15 changes: 14 additions & 1 deletion content/en/docs/concepts/workloads/pods/pod-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,19 @@ termination grace period _begins_. The behavior above is described when the
feature gate `EndpointSliceTerminatingCondition` is enabled.
{{</note>}}

{{<note>}}
Starting from Kubernetes 1.29, if your Pod has one or more sidecar containers,
the kubelet will wait until the last main containers has terminated before
sending the TERM signal to the sidecar containers on reverse order
of their declaration in the Pod spec.
This is to ensure that sidecar containers can continue to serve the other
containers in the Pod until they are terminated.
Please note that slow termination of the main container will also delay the
termination of the sidecar containers and may trigger emergency termination
of the Pod if the grace period expires. In such cases, all remaining containers
in the Pod will be terminated with SIGKILL simultaneously.
{{</note>}}

1. When the grace period expires, the kubelet triggers forcible shutdown. The container runtime sends
`SIGKILL` to any processes still running in any container in the Pod.
The kubelet also cleans up a hidden `pause` container if that container runtime uses one.
Expand Down Expand Up @@ -584,4 +597,4 @@ for more details.

* For detailed information about Pod and container status in the API, see
the API reference documentation covering
[`status`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodStatus) for Pod.
[`status`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodStatus) for Pod.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ For a reference to old feature gates that are removed, please refer to
| `SELinuxMountReadWriteOncePod` | `true` | Beta | 1.28 | |
| `SchedulerQueueingHints` | `false` | Alpha | 1.28 | |
| `SecurityContextDeny` | `false` | Alpha | 1.27 | |
| `SidecarContainers` | `false` | Alpha | 1.28 | |
| `SidecarContainers` | `true` | Beta | 1.28 | 1.29 |
| `SizeMemoryBackedVolumes` | `false` | Alpha | 1.20 | 1.21 |
| `SizeMemoryBackedVolumes` | `true` | Beta | 1.22 | |
| `SkipReadOnlyValidationGCE` | `false` | Alpha | 1.28 | |
Expand Down

0 comments on commit 755dec3

Please sign in to comment.