aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api/healthcheckhandler.go
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2022-04-11 20:36:00 +0200
committerLukasz Rajewski <lukasz.rajewski@orange.com>2022-04-11 20:36:23 +0200
commite503b0942f87b5e3a9f43e8395dcd6d185b8d9ca (patch)
tree7a6f28a6718e153043ff6a428af83c886203e14f /src/k8splugin/api/healthcheckhandler.go
parent76b4c1981e361b52e94c1545e15a9d90ed311b1e (diff)
Fixed detection of the etcd connection status
Issue-ID: MULTICLOUD-1468 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: If243e9a484afe5db7d9538a1875241fa425a2516
Diffstat (limited to 'src/k8splugin/api/healthcheckhandler.go')
-rw-r--r--src/k8splugin/api/healthcheckhandler.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/k8splugin/api/healthcheckhandler.go b/src/k8splugin/api/healthcheckhandler.go
index 896c6df0..2b338b94 100644
--- a/src/k8splugin/api/healthcheckhandler.go
+++ b/src/k8splugin/api/healthcheckhandler.go
@@ -31,5 +31,10 @@ func healthCheckHandler(w http.ResponseWriter, r *http.Request) {
return
}
+ err = db.Etcd.HealthCheck()
+ if err != nil {
+ http.Error(w, err.Error(), http.StatusInternalServerError)
+ return
+ }
w.WriteHeader(http.StatusOK)
}