Spring-boot: Allow shutdown endpoint to accept GET

Created on 16 Sep 2019  路  5Comments  路  Source: spring-projects/spring-boot

Kubernetes can trigger a shutdown but only by issuing a GET. Our current shutdown endpoint only accept POST which makes it unusable.

pending-design-work enhancement

Most helpful comment

I really don't like this. GET requests should have no side-effects and be idempotent. Shutting down the app on GET violates both of those. My understanding is that Kubernetes will send SIGTERM to initiate shutdown. Can't we rely on that instead?

All 5 comments

See #18244

I really don't like this. GET requests should have no side-effects and be idempotent. Shutting down the app on GET violates both of those. My understanding is that Kubernetes will send SIGTERM to initiate shutdown. Can't we rely on that instead?

I raised this when watching @saturnism present Kubernetes best practices at a conference. Looking at the documentation, I'm not really sure why the HTTP method would be used over SIGTERM. Perhaps Ray can comment?

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

Was this page helpful?
0 / 5 - 0 ratings