Skip to content

Commit

Permalink
Merge pull request #131 from sunya-ch/v1.0.5
Browse files Browse the repository at this point in the history
remove healthz
  • Loading branch information
sunya-ch authored Jul 24, 2023
2 parents 7497d12 + 8a8c99f commit aeac2c8
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"context"
"flag"
"fmt"
"net/http"
"os"
"time"

Expand Down Expand Up @@ -49,14 +48,6 @@ func init() {
//+kubebuilder:scaffold:scheme
}

// Handler for the ready check endpoint
func readyzHandler(r *http.Request) error {
if controllers.ConfigReady {
return nil
}
return fmt.Errorf("wait for config")
}

func main() {
var metricsAddr string
var enableLeaderElection bool
Expand Down Expand Up @@ -203,7 +194,7 @@ func main() {
setupLog.Error(err, "unable to set up health check")
os.Exit(1)
}
if err := mgr.AddReadyzCheck("readyz", readyzHandler); err != nil {
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
setupLog.Error(err, "unable to set up ready check")
os.Exit(1)
}
Expand Down

0 comments on commit aeac2c8

Please sign in to comment.