From 3321092928a91e1a6b6d8b8a4d68b809798a4492 Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Sat, 16 May 2020 17:30:59 +0200 Subject: [PATCH] Add a /healthcheck middleware The /healthcheck URL, as provided by oslo.middleware, is very useful for operators to setup haproxy and to do monitoring. Such feature is already in many services like Keystone, Glance, and others. The same type of patch has been approved in Neutronm, Heat, and Cinder. It's under discussion in Nova, where they want to check more than just the wsgi app, though the pricinple to add it has been accepted already. Change-Id: I8f24431db0ec88385b4b916e181d6da3e598c764 --- etc/designate/api-paste.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etc/designate/api-paste.ini b/etc/designate/api-paste.ini index 41e840d41..816ae34c3 100644 --- a/etc/designate/api-paste.ini +++ b/etc/designate/api-paste.ini @@ -1,6 +1,7 @@ [composite:osapi_dns] use = egg:Paste#urlmap /: osapi_dns_versions +/healthcheck: healthcheck /v2: osapi_dns_v2 /admin: osapi_dns_admin @@ -59,3 +60,8 @@ paste.filter_factory = designate.api.middleware:FaultWrapperMiddleware.factory [filter:validation_API_v2] paste.filter_factory = designate.api.middleware:APIv2ValidationErrorMiddleware.factory + +[app:healthcheck] +paste.app_factory = oslo_middleware:Healthcheck.app_factory +backends = disable_by_file +disable_by_file_path = /etc/designate/healthcheck_disable