Alias /health/liveliness as /health/liveness
The latter is the more common term in Kubernetes, so it's nice to support that.
This commit is contained in:
parent
57f6923ab6
commit
7b1c72e3f4
@ -304,6 +304,7 @@ class LiteLLMRoutes(enum.Enum):
|
||||
"/routes",
|
||||
"/",
|
||||
"/health/liveliness",
|
||||
"/health/liveness",
|
||||
"/health/readiness",
|
||||
"/test",
|
||||
"/config/yaml",
|
||||
|
||||
@ -482,7 +482,12 @@ async def health_readiness():
|
||||
|
||||
|
||||
@router.get(
|
||||
"/health/liveliness",
|
||||
"/health/liveliness", # Historical LiteLLM name; doesn't match k8s terminology but kept for backwards compatibility
|
||||
tags=["health"],
|
||||
dependencies=[Depends(user_api_key_auth)],
|
||||
)
|
||||
@router.get(
|
||||
"/health/liveness", # Kubernetes has "liveness" probes (https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command)
|
||||
tags=["health"],
|
||||
dependencies=[Depends(user_api_key_auth)],
|
||||
)
|
||||
@ -515,6 +520,11 @@ async def health_readiness_options():
|
||||
tags=["health"],
|
||||
dependencies=[Depends(user_api_key_auth)],
|
||||
)
|
||||
@router.options(
|
||||
"/health/liveness", # Kubernetes has "liveness" probes (https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command)
|
||||
tags=["health"],
|
||||
dependencies=[Depends(user_api_key_auth)],
|
||||
)
|
||||
async def health_liveliness_options():
|
||||
"""
|
||||
Options endpoint for health/liveliness check.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user