-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Document Kubernetes preStop handler when using a Docker image without a shell #43830
Comments
We also have #20995 open |
Then this ticket can be considered mostly as a documentation update and maybe worth to review #20995 in the light that situation has changed now - by default(using paketo buildpacks) there is no option to execute shell commands in container anymore. |
@philwebb maybe #20995 is not needed anymore - #20995 (comment) Since 1.32 is GA and sleep option is enabled there, then right thing to do would be just to update the documentation. |
The
|
@mhalbritter from the release notes 1.32: Unfortunately, don't have 1.32 yet to verify, but looks like it's GA now. |
Huh, yeah, looks like it. Then the doc is outdated. |
Just tested it with Kubernetes 1.32.0 and lifecycle:
preStop:
sleep:
seconds: 10 works. We'll update the documentation. |
Or, maybe, not exactly inconsistency but now it's a bit misleading...
In the Kubernetes Container Lifecycle there is a suggestion to use preStop handler like this:
command: ["sh", "-c", "sleep 10"]
Problem is that by default Spring Boot paketo images from now on use
paketobuildpacks/builder-jammy-java-tiny
image, which does not have any shell.So, either a new recipe should be suggested or a word of warning should say that for default spring boot images that won't work anymore.
As a suggestion - maybe include "sleep" command into the image, so something like this would work?
The text was updated successfully, but these errors were encountered: