`/deployments/{uuid}/health` ignores response status
flippingbits opened this issue · 0 comments
We provide the endpoint /deployments/{uuid}/health
as a means to retrieve the health status of a given deployment.
Internally, our control plane calls the /health
endpoint of the deployment running in the Kubernetes cluster and forwards the response body from that endpoint to the consumer of our API. It ignores the HTTP status code of the response but always sends the status OK (except in the case of any other exceptions being thrown while processing the request).
I propose to consider the HTTP status code of the deployment and return an internal server error if it can be considered as unhealthy, i.e., when it is not OK. This would ease the programmatic evaluation of the health status of deployments.