Skip to content
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

Merged
merged 1 commit into from Nov 5, 2019

Conversation

Joseph-Irving
Copy link
Member

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 as Runnning 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 a RestartPolicy: 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

@k8s-ci-robot k8s-ci-robot added sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 30, 2019
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 30, 2019
@k8s-ci-robot k8s-ci-robot added the kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory label Oct 30, 2019
@Joseph-Irving
Copy link
Member Author

cc @dchen1107 @derekwaynecarr

@derekwaynecarr
Copy link
Member

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

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 5, 2019
@dchen1107
Copy link
Member

Joseph, thanks for updating KEP and make this much more cleaner. The new proposal makes sense to me.

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 8fbfb39 into kubernetes:master Nov 5, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants