Skip to content

Commit

Permalink
Swap livness probe and readiness probe
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Iwai <[email protected]>
  • Loading branch information
tenzen-y committed Aug 3, 2023
1 parent b266560 commit eac65bf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/katib-controller/v1beta1/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,11 @@ func main() {
go setupControllers(mgr, certsReady, hookServer)

log.Info("Setting up health checker.")
// TODO (@anencore94) need to more detailed check whether is it possible to communicate with k8s-apiserver or db-manager at '/readyz' ?
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
if err := mgr.AddReadyzCheck("readyz", hookServer.StartedChecker()); err != nil {
log.Error(err, "Unable to add readyz endpoint to the manager")
os.Exit(1)
}
if err = mgr.AddHealthzCheck("healthz", hookServer.StartedChecker()); err != nil {
if err = mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
log.Error(err, "Add webhook server health checker to the manager failed")
os.Exit(1)
}
Expand Down

0 comments on commit eac65bf

Please sign in to comment.