Set health checks in Gatekeeper so they cover the gin server and the controller cache
As suggested by @sreis on !1595 (comment 952595039)
Suggestion not to set the health checks here and instead call healthz.Ping
in a gin handler. The gin middleware requires setting up a connection to redis and other components as well and these liveness and readiness checks don't account for it. Also, these are exposed in a different http server and the deployment liveness and readiness checks can only query one endpoint in case you wanted to check the gin stuff and these.
The gin middleware requires setting up a connection to redis and other components as well and these liveness and readiness checks don't account for it
Worth mentioning here that Redis in this case is first connected upon the first incoming request to Gatekeeper. Because we use a sentinel set up for Redis, we actively check the Sentinel to get the latest master. If this fails, the container will exit to force a restart.