Skip to content

Commit

Permalink
Add service healthcheck endpoint (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvaalexp authored Apr 1, 2022
1 parent 229e7f4 commit 40884a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/httpd/simpleserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func (simpleServer *SimpleServer) Start() error {
PodHandler: &simpleServer.Patcher,
},
}
mux.HandleFunc("/healthz", webhook.HealthHandler)
mux.HandleFunc("/mutate", admissionHandler.HandleAdmission)

if simpleServer.Local {
Expand Down
7 changes: 7 additions & 0 deletions pkg/webhook/health.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package webhook

import "net/http"

func HealthHandler(writer http.ResponseWriter, _ *http.Request) {
writer.WriteHeader(http.StatusOK)
}

0 comments on commit 40884a8

Please sign in to comment.