Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! enhancement: add livez endpoint
Browse files Browse the repository at this point in the history
rexagod committed Jun 13, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
juliusknorr Julius Knorr
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
@@ -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)))

0 comments on commit 6dfc78e

Please sign in to comment.