-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Introducing Sleep Action for PreStop Hook #3960
Comments
/sig node |
/cc @thockin |
/milestone v1.28 adding to the milestone for tracking |
Hello @AxeZhan 👋, Enhancements team here. Just checking in as we approach Enhancements freeze on Thursday, 16th June 2023. This enhancement is targeting for stage Here's where this enhancement currently stands:
For this KEP, we would need to update the following:
The status of this enhancement is marked as |
/stage alpha |
Hey @AxeZhan, |
this should be updated now. Since there were no material change, can we get it tracked for 1.28? |
With all the KEP requirements in place and merged into k/enhancements, the status of this enhancement is now marked as |
Hey @AxeZhan 1.28 Docs Shadow here. Does this enhancement work planned for 1.28 require any new docs or modification to existing docs? If so, please follows the steps here to open a PR against dev-1.28 branch in the k/website repo. This PR can be just a placeholder at this time and must be created before Thursday 20th July 2023. Also, take a look at Documenting for a release to get yourself familiarize with the docs requirement for the release. Thank you! |
hi @AdminTurnedDevOps , we currently working on the implement in k/k repos, when we finish it, we will start to add docs. Thanks. |
Hey @AdminTurnedDevOps
This definitely needs some new docs :) |
Hi all, I've created kubernetes/kubernetes#119026 for some discussion(because I'm not certain of some implementations/e2e tests), I'd be super glad if some of you can have a look and give me a help😊。 |
Hey again @AxeZhan 👋 Just checking in as we approach Code freeze at 01:00 UTC Friday, 19th July 2023 . Here’s the enhancement’s state for the upcoming code freeze:
For this enhancement, it looks like the following code related PR/s are open and they need to be merged or should be in merge-ready state before the code freeze commences : This is the code related PR/s that I found on this KEP issue Please keep the issue description up-to-date with all the PR/s that are associated with this KEP and let me know if there are other PR/s in k/k we should be tracking for this KEP. As always, we are here to help if any questions come up. Thanks! |
Hello @AxeZhan 👋, 1.28 Enhancements Lead here. Unfortunately, the implementation (code related) PR associated with this enhancement is not in the merge-ready state by code-freeze and hence this enhancement is now removed from the v1.28 milestone. If you still wish to progress this enhancement in v1.28, please file an exception request. Thanks! /milestone clear |
/remove-stage alpha |
/stage stable |
Hello. In our usecase we add lifecycle:
preStop:
exec:
command:
- "true" To remove dependency on lifecycle:
preStop:
sleep: 0 and discovered it does not pass validation:
Is it possible to allow zero seconds value to enable no-op |
can't you use an annotation? |
This is possible but my inquiry is more about allowing zero value. E.g. go time.Sleep permits zero sleep duration:
|
We could, I guess. It's not semantically wrong.
We would have to add a feature gate to allow 0, do 1 alpha release, then
move it to beta or GA.
Needs a short KEP to track the gate.
…On Thu, Jul 4, 2024, 9:02 AM Alexander Yastrebov ***@***.***> wrote:
can't you use an annotation?
This is possible but my inquiry is more about allowing zero value.
E.g. go time.Sleep <https://pkg.go.dev/time#Sleep> permits zero sleep
duration:
A negative or zero duration causes Sleep to return immediately.
—
Reply to this email directly, view it on GitHub
<#3960 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKWAVF6EEXL4TMYHJ2PUKTZKVWZJAVCNFSM6AAAAAAXHWZB7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBZGI4DGOBWGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Prestop is already a pointer agree is semantically correct, but the motivation is the one that I'm a bit confused
the logic implemented seems to be "by default I will add a hook, if you want to opt-out , just add one that is a noop" |
If the logic was:
Then any user can set preStop, whether to sleep(0) or sleep(3) or exec or whatever. I agree it's a little odd to use this as a trigger, but it seems consistent to support it. It' s sort of morally equivalent to a |
who wants to create the KEP 😄 ??? This change will need to be feature gated, it is a small KEP, but it will require some work |
Does it have to be a KEP and a feature gate at all? It seems that zero value was already a part of the original KEP, e.g. here I read:
|
oops! It looks like the implementation demands >0 when it should have been >=0.
Unfortunately yes. In particular, we need to handle this case:
Demanding 1 release with an alpha gate means you CAN roll back and it will be tolerated. |
@aojea @thockin I'd be interested in driving this if @AlexanderYastrebov isn't picking it up already! |
We went ahead with a sleep 1 as the next best thing for now: lifecycle:
preStop:
sleep:
seconds: 1 # not possible to set to 0: https://github.com/kubernetes/enhancements/issues/3960#issuecomment-2208556397
I did not pick it up but curious to learn the amount of effort required to fix such a minor bug in KEP implementation. |
@sreeram-venkitesh can you just add @AlexanderYastrebov to whatever you propose as changes to fix it (KEP and PR)? As far as I understand @AlexanderYastrebov could learn this way and @AlexanderYastrebov can review the change proposals. Please correct me if I am wrong. :) |
@szuecs Looks like we'd need to roll this out as a different KEP as mentioned by @thockin in #3960 (comment) so that we can roll back the change if needed. |
@sreeram-venkitesh yes! |
Example of a KEP to relax validation https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/4427-relaxed-dns-search-validation |
@szuecs Ah sorry! I thought you were talking about adding the change in the same KEP! Thanks for clarifying! I will ping you both once I have something ready. @aojea Since we're past the enhancements freeze, this new offshoot KEP can target for alpha in v1.32 right? I can put something together soon and keep the KEP ready before the next release cycle starts. What do you think? |
@sreeram-venkitesh we don't need to rush this, v1.32 looks fine. |
Are we allowed to have a KEP that has multiple Gates? I think so right? If
so, adding it to this KEP is probably a bit simpler, but it messes a little
bit with the life cycle tracking where we tend to think of a single KEP as
alpha, beta, GA.
…On Mon, Jul 8, 2024, 6:50 AM Sandor Szücs ***@***.***> wrote:
@sreeram-venkitesh <https://github.com/sreeram-venkitesh> we don't need
to rush this, v1.32 looks fine.
—
Reply to this email directly, view it on GitHub
<#3960 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKWAVDNEFFYXTN4BNJ5TP3ZLKKLXAVCNFSM6AAAAAAXHWZB7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJUGEZTGOBXGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@thockin Since this KEP would be graduating from beta to GA in 1.32, would adding another gate in the same KEP require another round of beta then? Else the new feature gate would be going straight to GA right? |
In theory, the one gate could go GA while the other did not. It's not COMMON, and this one is small, so I guess a new KEP is easy enough. |
For the new KEP, let's get the issue created so we can discuss separate from this one. Looking at this KEP, it sounds like someone wants to promote this to stable in 1.32. I will move this to considered for release for sig-node. |
@kannon92 I'll tag in the issue for the new KEP once I open it. I've been drafting the KEP doc and was planning to open the issue soon. |
Why not GA this? I mean, it's useful as is, the "allow 0" KEP can follow. |
Enhancement Description
k/enhancements
) update PR(s): KEP-3960: Introducing Sleep Action for PreStop Hook #3961k/k
) update PR(s): Introducing Sleep Action for PreStop Hook kubernetes#119026k/website
) update PR(s):Add information about PodLifecycleSleepAction (KEP3960) website#43428k/enhancements
) update PR(s): KEP-3960: promote to beta in 1.30 #4367k/k
) update PR(s): [KEP 3960]: graduate PodLifecycleSleepAction to beta kubernetes#122456k/website
) update(s): graduate PodLifecycleSleepAction to beta (KEP 3960) website#45129k/enhancements
) update PR(s):k/k
) update PR(s):k/website
) update(s):Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.
The text was updated successfully, but these errors were encountered: