Skip to content

Commit

Permalink
add /health endpoint (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbren authored May 7, 2019
1 parent 520d657 commit 740e3ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deploy/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm/fairwinds/templates/dashboard.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down

0 comments on commit 740e3ad

Please sign in to comment.