Closed
Description
currently our controllers are lacking essential /healthz
and /readyz
endpoints for monitoring service health and readiness. To address this, we can utilize controller-runtime
(healthz and readyz libraries).
We will also need necessary to add configurations for deployment manifests and helm charts readinessProbe
and livenessProbe.
.
Changes needs to be added to the code-generator main.go.tpl
and should be as easy as:
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
setupLog.Error(err, "unable to set up health check")
os.Exit(1)
}
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
setupLog.Error(err, "unable to set up ready check")
os.Exit(1)
}