Closed fmoessle closed 2 years ago
Imagine your application loses the connection to its database (or something similar). In this case, you don't want /live to respond with 200 and "SERVER_IS_NOT_SHUTTING_DOWN"
Then you should either signal "not ready" or "not live" (depending on whether you expect application to automatically recover). Kubernetes will handle restarting of the application.
I don't comprehend the use case for what is being asked. What is going to be reading the custom response?
Currently /live provides information about the current shutdown state of the server: "SERVER_IS_NOT_SHUTTING_DOWN" or "SERVER_IS_SHUTTING_DOWN".
While this is ok for simple use-cases, it does not truly reflect the liveness state of every application. Imagine your application loses the connection to its database (or something similar). In this case, you don't want /live to respond with 200 and "SERVER_IS_NOT_SHUTTING_DOWN". Instead, you want the liveness probe to fail and the application to be restarted.
godaddy/terminus let's define you a custom health check method
and defaults to returning the state if no custom method was defined.
@gajus Is this a feature that could be implemented or would it be out-of-scope for this project?