-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Fix: Correct sidecar container termination order in pod lifecycle doc #51506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @salaxander ! Kindly requesting a review for this small documentation fix. |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/hold
I believe the docs are correct here. Can you provide evidence they are not?
Thanks for the review! You're right to ask for verification. This fix is based on a test shared by Alexandru Gheorghe in the Normal Created 96s kubelet Created container: myapp He confirmed this behavior even when the main container had a 10-second delay on shutdown. The full conversation is available here: You had suggested in that same thread that this might be a docs bug and encouraged filing a PR — so I’ve opened this PR as a follow-up to that suggestion. |
@kubernetes/sig-node-pr-reviews please look at this. I have concerns. I think sidecar containers should wait for the app container to stop before the sidecars start to terminate; I suspect that the current documentation accurately describes the current behavior. Can you provide a technical review to confirm that the change is correct? Although I triaged the issue as accepted, I personally have not verified how Kubernetes actually works. @intojhanurag would you be willing to provide a manifest for a Job that demonstrates that the commits in this PR are correct? If so please include any appropriate annotations etc. |
Sure, thanks for raising this! |
@intojhanurag: Reiterating the mentions to trigger a notification: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/cc |
Hi @lmktfy, I've tried setting up a Job and Pod with signal traps in Minikube to capture container shutdown order, but couldn’t consistently observe termination logs — possibly due to how fast the pod exits or log collection behavior. That said, I still believe the issue is valid based on the Slack thread. If someone from SIG Node could validate or reproduce the behavior from their side, that would really help. Totally okay if the PR needs to be paused or closed for now — thank you for your time and review! /cc @kubernetes/sig-node-pr-reviews |
@intojhanurag: GitHub didn't allow me to request PR reviews from the following users: kubernetes/sig-node-pr-reviews. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@intojhanurag: Reiterating the mentions to trigger a notification: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This PR corrects a documentation bug where the shutdown order of containers in a Pod was previously stated incorrectly.
Problem
The earlier version claimed that sidecar containers are terminated after the main container, which contradicts the actual behavior.
Fix
Updated the doc to reflect that sidecar containers are stopped before the main application container, as per Kubernetes implementation.
References
/sig node