mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-05-21 08:33:55 +00:00
add /health endpoint (#74)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
3
main.go
3
main.go
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user