Skip to content

Commit

Permalink
fixup! enhancement: add livez endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
rexagod committed Jun 13, 2024
1 parent 4b03c21 commit 6dfc78e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func buildMetricsServer(m *metricshandler.MetricsHandler, durationObserver prome
mux.Handle(livezPath, http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {

// Query the Kube API to make sure we are not affected by a network outage.
got := client.CoreV1().RESTClient().Get().AbsPath("/apis/").Do(context.Background())
got := client.CoreV1().RESTClient().Get().AbsPath("/livez").Do(context.Background())
if got.Error() != nil {
w.WriteHeader(http.StatusServiceUnavailable)
w.Write([]byte(http.StatusText(http.StatusServiceUnavailable)))
Expand Down

0 comments on commit 6dfc78e

Please sign in to comment.