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
update sidecars kep, changes to TerminationGracePeriod/Pod phase #1344
Conversation
Hi @Joseph-Irving. 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/test-infra repository. |
I have no major concerns with this proposal. I still wish we could properly send termination grace period to CRI providers at container startup time so power down of host can handle those appropriately by integrating with the init system, but that is a different topic. /lgtm |
Joseph, thanks for updating KEP and make this much more cleaner. The new proposal makes sense to me. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dchen1107, derekwaynecarr, Joseph-Irving 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 |
After some discussion on the implementation PR kubernetes/kubernetes#80744 some issues cropped up that need clarifying in the KEP.
Firstly TerminationGracePeriod, I've updated the wording to be more explicit over how exactly it would behave in the current design.
There was a suggestion that perhaps both the Sidecars and Containers could have a separate GracePeriod, e.g. if
TerminationGracePeriod: 30s
, the Containers would have 30 seconds to Terminate and then the Sidecars would have 30 seconds. So you could end up with 2xGracePeriod. But I'm not sure whether we should go with this or not.In regards to PodPhase, we originally said not to change this I noticed one particularly odd case which made me think it might need a tweak for this to work.
If your Pod has
RestartPolicy: OnFailure
, once your non-sidecars have completed, the sidecar will get sent a termination signal, if it exits with a non-zero code the Pod Phase would be calculated asRunnning
despite all containers being permanently stopped.So changing pod phase to ignore sidecars for these scenarios is a potential solution, it would also stop a sidecar that exited badly causing a Pod to be
Failed
in aRestartPolicy: Never
scenario. You could argue that all sidecars should exit cleanly with a zero, but realistically I don't think we can assume this would always be the case.So I would appreciate some other people's thoughts on which direction we should go with these two things.
/sig apps
/sig node