Revert "root: handle liveness probe in router"
This reverts commit d39dbc7287
.
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
57e86582d1
commit
3e5b05203b
|
@ -58,6 +58,13 @@ class MetricsView(View):
|
||||||
return ExportToDjangoView(request)
|
return ExportToDjangoView(request)
|
||||||
|
|
||||||
|
|
||||||
|
class LiveView(View):
|
||||||
|
"""View for liveness probe, always returns Http 204"""
|
||||||
|
|
||||||
|
def dispatch(self, request: HttpRequest) -> HttpResponse:
|
||||||
|
return HttpResponse(status=204)
|
||||||
|
|
||||||
|
|
||||||
class ReadyView(View):
|
class ReadyView(View):
|
||||||
"""View for readiness probe, always returns Http 204, unless sql or redis is down"""
|
"""View for readiness probe, always returns Http 204, unless sql or redis is down"""
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ from structlog.stdlib import get_logger
|
||||||
|
|
||||||
from authentik.core.views import error
|
from authentik.core.views import error
|
||||||
from authentik.lib.utils.reflection import get_apps
|
from authentik.lib.utils.reflection import get_apps
|
||||||
from authentik.root.monitoring import MetricsView, ReadyView
|
from authentik.root.monitoring import LiveView, MetricsView, ReadyView
|
||||||
|
|
||||||
LOGGER = get_logger()
|
LOGGER = get_logger()
|
||||||
|
|
||||||
|
@ -44,5 +44,6 @@ for _authentik_app in get_apps():
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
path("metrics/", MetricsView.as_view(), name="metrics"),
|
path("metrics/", MetricsView.as_view(), name="metrics"),
|
||||||
|
path("-/health/live/", LiveView.as_view(), name="health-live"),
|
||||||
path("-/health/ready/", ReadyView.as_view(), name="health-ready"),
|
path("-/health/ready/", ReadyView.as_view(), name="health-ready"),
|
||||||
]
|
]
|
||||||
|
|
Reference in New Issue