diff --git a/etc/sahara/api-paste.ini b/etc/sahara/api-paste.ini index b00a5adc4f..04fcea5a71 100644 --- a/etc/sahara/api-paste.ini +++ b/etc/sahara/api-paste.ini @@ -3,6 +3,7 @@ pipeline = cors http_proxy_to_wsgi request_id versions acl auth_validator sahara [composite:sahara_api] use = egg:Paste#urlmap +/healthcheck: healthcheck /: sahara_apiv2 # this app is given as a reference for v1-only deployments @@ -37,3 +38,8 @@ paste.filter_factory = sahara.api.middleware.version_discovery:VersionResponseMi # this filter is given as a reference for v1-only deployments #[filter:versions] #paste.filter_factory = sahara.api.middleware.version_discovery:VersionResponseMiddlewareV1.factory + +[app:healthcheck] +paste.app_factory = oslo_middleware:Healthcheck.app_factory +backends = disable_by_file +disable_by_file_path = /etc/sahara/healthcheck_disable diff --git a/releasenotes/notes/healthcheck-02e429a3ffcd9482.yaml b/releasenotes/notes/healthcheck-02e429a3ffcd9482.yaml new file mode 100644 index 0000000000..3fd61e1b57 --- /dev/null +++ b/releasenotes/notes/healthcheck-02e429a3ffcd9482.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + Now healthcheck middleware is enabled by default. Applications like + loadbalancer or monitoring tools can use ``/healthcheck`` path to monitor + health of each API endpoints. Remove entries for healthcheck from + ``api-paste.ini`` to disable this functionality. diff --git a/tools/config/config-generator.sahara.conf b/tools/config/config-generator.sahara.conf index b0ad3a130c..2e056f9130 100644 --- a/tools/config/config-generator.sahara.conf +++ b/tools/config/config-generator.sahara.conf @@ -7,6 +7,7 @@ namespace = oslo.db namespace = oslo.log namespace = oslo.messaging namespace = oslo.middleware.cors +namespace = oslo.middleware.healthcheck namespace = oslo.middleware.http_proxy_to_wsgi namespace = oslo.policy namespace = oslo.service.periodic_task