-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
[SidecarContainer] provide sidecar best practices hints about exit code #48228
Conversation
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
If we want to document good practice, I'd put that elsewhere (not inside a tutorial page). |
Any suggestions? |
Let's add it to this page: https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/#differences-from-application-containers And link the differences section from where you put this node to originally |
Thanks @SergeyKanzhelev . |
content/en/docs/tutorials/configuration/pod-sidecar-containers.md
Outdated
Show resolved
Hide resolved
@@ -115,6 +115,9 @@ Init containers stop before the main containers start up, so init containers can | |||
exchange messages with the app container in a Pod. Any data passing is one-way | |||
(for example, an init container can put information inside an `emptyDir` volume). | |||
|
|||
From kubernetes perspective, sidecars will receive the `SIGTERM` following with `SIGKILL`, |
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.
I think this belongs to the previous section - Differences from application containers
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.
That makes sense.
From kubernetes perspective, sidecars will receive the `SIGTERM` following with `SIGKILL`, | ||
so exit codes != 0 for sidecar containers are normal on main container exit and should be ignored. |
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.
From kubernetes perspective, sidecars will receive the `SIGTERM` following with `SIGKILL`, | |
so exit codes != 0 for sidecar containers are normal on main container exit and should be ignored. | |
From Kubernetes perspective, sidecars graceful termination is less important. When other containers took all alloted graceful termination time, sidecar containers will receive the `SIGTERM` following with `SIGKILL` faster than may be expected. So exit codes different from `0` (`0` indicates successful exit), for sidecar containers are normal on Pod termination and should be generally ignored by the external tooling. |
Update content/en/docs/concepts/workloads/pods/sidecar-containers.md Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com> Update content/en/docs/tutorials/configuration/pod-sidecar-containers.md Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
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.
/lgtm
LGTM label has been added. Git tree hash: c6fe3401a5d3beab9aa00a44c4ebf2f585057d08
|
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.
This change improves our documentation.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SergeyKanzhelev, sftim The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
This is a follow up from kubernetes/enhancements#753 (comment)
We need to improve the page https://kubernetes.io/docs/tutorials/configuration/pod-sidecar-containers/ with the best practices on how to implement sidecar containers. Things like exiting with 0 on SIGTERM
Issue
Closes: #47823