Open scottfrederick opened 1 month ago
Thanks, @scottfrederick. Great catch. I have a pending PR #7 on this guide that touches a lot of files. I made an additional commit there that removes the preStop
instructions.
PR #7 is waiting on a review from @ryanjbaxter but please feel free to also have a look.
The credit goes to @anthonydahanne for finding this and bringing it to our attention. Thanks @robertmcnees for the cleanup PR, I'll take a look.
The following should be removed from the example
deployment.yaml
file:The
preStop
is not necessary since Spring Boot apps handleSIGTERM
notifications and gracefully shut down.In addition, Docker images for applications are often built with distroless base images that do not include a shell, so commands like the
sh -c sleep 10
recommended here will not work. The./mvnw spring-boot:build-image
command suggested in this guide will use a base image that does not include a shell starting with Spring Boot 3.4.