As a developer, I want the social-app-template-backend to have a HealthController that can be queried for health, livez, and readyz. The HealthController should check that all micro-services are available before making the backend state ready.
Discussion
At startup, social-app-template-backend should check each micro-service readyz endpoint in a while loop that will wait forever, if a micro-service is not available. Once this check is completed, the backend can enable the readyz endpoint.
Reasoning:
Availability of the content-watcher (or other micro-services) is not an internal application error, and likely will not be fixed by the service being restarted.
Why /readyz instead of /livez? Same as above--/livez failure would cause K8s to restart the pod; this likely won't help the situation. But /readyz failure should prevent us from routing traffic to the pod until it is fully up.
Acceptance Criteria
[ ] social-app-template-backend should check the health of all the micro-services.
[ ] The social-app-template-backend readiness probe /readyz shall be dependent on all micro-services successfully completing a health check.
As a developer, I want the
social-app-template-backend
to have aHealthController
that can be queried forhealth
,livez
, andreadyz
. TheHealthController
should check that all micro-services are available before making the backend state ready.Discussion
At startup,
social-app-template-backend
should check each micro-servicereadyz
endpoint in a while loop that will wait forever, if a micro-service is not available. Once this check is completed, the backend can enable thereadyz
endpoint.Reasoning:
Availability of the content-watcher (or other micro-services) is not an internal application error, and likely will not be fixed by the service being restarted.
Why
/readyz
instead of/livez
? Same as above--/livez
failure would cause K8s to restart the pod; this likely won't help the situation. But/readyz
failure should prevent us from routing traffic to the pod until it is fully up.Acceptance Criteria
social-app-template-backend
should check the health of all the micro-services.social-app-template-backend
readiness probe/readyz
shall be dependent on all micro-services successfully completing a health check.