-
Notifications
You must be signed in to change notification settings - Fork 1.5k
KEP-5307 Initial KEP for container restart policy #5308
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: master
Are you sure you want to change the base?
Conversation
yuanwang04
commented
May 16, 2025
- One-line PR description: Initial KEP for container restart policy
- Issue link: Container restart rules to customize the pod restart policy #5307
- Other comments: Discussion link https://docs.google.com/document/d/13fQu343OBEM2ICHLXfWHrApmzskd4nY3xWI27EbMJyI/edit?tab=t.0
Welcome @yuanwang04! |
Hi @yuanwang04. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
we may need to implement as described here: https://github.com/kubernetes/enhancements/issues/3329#issuecomment-1571643421 | ||
|
||
``` | ||
restartPolicy: Never |
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.
@dchen1107 I remember you had a concern with having Never
pod with the container inside it that has restart count increasing. How strong is this concern? Strong enough to iontroduce the restartPolicy: Custom
?
6cb2b80
to
0cbfc18
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yuanwang04 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 |
/ok-to-test |
0cbfc18
to
040ffef
Compare
- name: myapp1 | ||
# the default behavior is inherited from the Pod’s restartPolicy | ||
restartPolicy: Custom | ||
# pod-level API for specifying container restart rules |
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 API is at the container level it seems.
The container restart will still follow the exponential backoff to avoid | ||
excessive resource consumption due to restarts. | ||
|
||
## Design Details |
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.
How does this interact with PodFailurePolicy?
A clearer definition of pod restart status should be delegated to the kubelet | ||
from the controllers. This proposal is also designed to address the gap in | ||
Job `podRestartPolicy`. Currently `podRestartPolicy` only supported | ||
`restartPolicy=Never`, and container in-place restarat will not be considered |
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.
`restartPolicy=Never`, and container in-place restarat will not be considered | |
`restartPolicy=Never`, and container in-place restart will not be considered |
81abd1c
to
31eeb57
Compare
31eeb57
to
dd2b1f7
Compare
@yuanwang04: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |