Skip to content

Commit

Permalink
feat: Add /healthz endpoint to prepare probes for Cilium chart
Browse files Browse the repository at this point in the history
  • Loading branch information
mkilchhofer authored and geakstr committed Jul 24, 2023
1 parent 4b35b3d commit a81ab2c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ func runServer(cfg *config.Config) {
)

handler := http.NewServeMux()
handler.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprintf(w, "ok")
})
handler.HandleFunc("/api/", func(resp http.ResponseWriter, req *http.Request) {
// NOTE: GRPC server handles requests with URL like "ui.UI/functionName"
req.URL.Path = req.URL.Path[len("/api/"):]
Expand Down

0 comments on commit a81ab2c

Please sign in to comment.