From 755dec34882f4f51d023694aba78754c84cd555f Mon Sep 17 00:00:00 2001 From: Matthias Bertschy Date: Fri, 13 Oct 2023 09:46:13 +0200 Subject: [PATCH] modifying docs for SidecarContainers beta graduation Signed-off-by: Matthias Bertschy --- content/en/docs/concepts/workloads/pods/_index.md | 4 ++-- .../concepts/workloads/pods/init-containers.md | 6 +++--- .../docs/concepts/workloads/pods/pod-lifecycle.md | 15 ++++++++++++++- .../command-line-tools-reference/feature-gates.md | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/content/en/docs/concepts/workloads/pods/_index.md b/content/en/docs/concepts/workloads/pods/_index.md index febf062c2ebdc..1132c38793c5a 100644 --- a/content/en/docs/concepts/workloads/pods/_index.md +++ b/content/en/docs/concepts/workloads/pods/_index.md @@ -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. diff --git a/content/en/docs/concepts/workloads/pods/init-containers.md b/content/en/docs/concepts/workloads/pods/init-containers.md index 2533c286d7907..03152840dd0f8 100644 --- a/content/en/docs/concepts/workloads/pods/init-containers.md +++ b/content/en/docs/concepts/workloads/pods/init-containers.md @@ -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. @@ -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. \ No newline at end of file diff --git a/content/en/docs/concepts/workloads/pods/pod-lifecycle.md b/content/en/docs/concepts/workloads/pods/pod-lifecycle.md index 1f73ccbe3ff99..5d28d1c58733b 100644 --- a/content/en/docs/concepts/workloads/pods/pod-lifecycle.md +++ b/content/en/docs/concepts/workloads/pods/pod-lifecycle.md @@ -504,6 +504,19 @@ termination grace period _begins_. The behavior above is described when the feature gate `EndpointSliceTerminatingCondition` is enabled. {{}} +{{}} +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. +{{}} + 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. @@ -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. \ No newline at end of file diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates.md b/content/en/docs/reference/command-line-tools-reference/feature-gates.md index 5ef1c5aa875e4..a1ae713aed097 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates.md @@ -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 | |