add /health endpoint (#74)

This commit is contained in:
Bobby Brennan
2019-05-07 16:29:55 -04:00
committed by GitHub
parent 520d6572e4
commit 740e3ad871
3 changed files with 7 additions and 4 deletions

View File

@@ -159,13 +159,13 @@ spec:
- containerPort: 8080
livenessProbe:
httpGet:
path: /
path: /health
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
httpGet:
path: /
path: /health
port: 8080
initialDelaySeconds: 15
periodSeconds: 20

View File

@@ -36,13 +36,13 @@ spec:
- containerPort: 8080
livenessProbe:
httpGet:
path: /
path: /health
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
httpGet:
path: /
path: /health
port: 8080
initialDelaySeconds: 15
periodSeconds: 20

View File

@@ -84,6 +84,9 @@ func main() {
}
func startDashboardServer(c conf.Configuration, k *kube.ResourceProvider, port int) {
http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("OK"))
})
http.HandleFunc("/results.json", func(w http.ResponseWriter, r *http.Request) {
dashboard.EndpointHandler(w, r, c, k)
})