kubernetes / website

Kubernetes website and documentation repo:
https://kubernetes.io
Creative Commons Attribution 4.0 International
4.6k stars 14.49k forks source link

sidecar-containers docs are wrong #48909

Closed liruonian closed 2 days ago

liruonian commented 2 days ago

This is a Bug Report

Problem: The goal is to showcase the YAML configuration for a sidecar, but what is actually shown is an initContainer.

Proposed Solution: Delete the redundant initContainer lines.

Page to Update: https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/ ref: (https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/application/deployment-sidecar.yaml) (https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/application/job/job-sidecar.yaml)

k8s-ci-robot commented 2 days ago

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
stmcginnis commented 2 days ago

The examples are correct. Please read the doc you linked for an explanation of how sidecar containers work.

If an init container is created with its restartPolicy set to Always, it will start and remain running during the entire life of the Pod.

https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/#sidecar-containers-and-pod-lifecycle

/close

k8s-ci-robot commented 2 days ago

@stmcginnis: Closing this issue.

In response to [this](https://github.com/kubernetes/website/issues/48909#issuecomment-2509607862): >The examples are correct. Please read the doc you linked for an explanation of how sidecar containers work. > >> If an init container is created with its restartPolicy set to Always, it will start and remain running during the entire life of the Pod. > >https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/#sidecar-containers-and-pod-lifecycle > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.