forked from phoenix/litellm-mirror
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
6f393be66b
commit
780a6293dc
2 changed files with 12 additions and 1 deletions
|
@ -304,6 +304,7 @@ class LiteLLMRoutes(enum.Enum):
|
|||
"/routes",
|
||||
"/",
|
||||
"/health/liveliness",
|
||||
"/health/liveness",
|
||||
"/health/readiness",
|
||||
"/test",
|
||||
"/config/yaml",
|
||||
|
|
|
@ -483,7 +483,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)],
|
||||
)
|
||||
|
@ -516,6 +521,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…
Add table
Add a link
Reference in a new issue