Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions kubernetes/apps/ai/litellm/app/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data:
maximum_spend_logs_retention_period: "30d" # else the spend-logs table grows forever
allow_requests_on_db_unavailable: true # CNPG restart != LLM outage (keys served from cache)
litellm_settings:
callbacks: ["prometheus"] # expose /metrics on the proxy port for the ServiceMonitor
drop_params: true # strip OpenAI params a backend doesn't support instead of 400ing
request_timeout: 600 # match the proxy/ollama timeout budget end-to-end
num_retries: 2 # retry transient backend failures before surfacing to the client
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/apps/ai/litellm/app/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
automountServiceAccountToken: false
containers:
- name: litellm
image: ghcr.io/berriai/litellm-database:v1.91.2
image: ghcr.io/berriai/litellm-database:v1.92.0
args:
- "--config"
- "/app/config.yaml"
Expand Down
19 changes: 19 additions & 0 deletions kubernetes/apps/ai/litellm/app/grafanadashboard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/grafana.integreatly.org/grafanadashboard_v1beta1.json
# LiteLLM ships no chart mixin (raw image deploy) — grafana-operator fetches the
# maintained dashboard JSON from the pinned tag; Renovate bumps the tag in the URL
# in lockstep with the litellm-database image.
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
name: litellm
spec:
allowCrossNamespaceImport: true
instanceSelector:
matchLabels:
grafana.internal/instance: grafana
datasources:
- inputName: DS_PROMETHEUS
datasourceName: prometheus
# renovate: datasource=docker depName=ghcr.io/berriai/litellm-database
url: https://raw.githubusercontent.com/BerriAI/litellm/v1.92.0/cookbook/litellm_proxy_server/grafana_dashboard/dashboard_v2/grafana_dashboard.json
2 changes: 2 additions & 0 deletions kubernetes/apps/ai/litellm/app/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ resources:
- ./deployment.yaml
- ./service.yaml
- ./httproute.yaml
- ./servicemonitor.yaml
- ./grafanadashboard.yaml
2 changes: 2 additions & 0 deletions kubernetes/apps/ai/litellm/app/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apiVersion: v1
kind: Service
metadata:
name: litellm
labels:
app: litellm # ServiceMonitor selects on this
spec:
selector:
app: litellm
Expand Down
22 changes: 22 additions & 0 deletions kubernetes/apps/ai/litellm/app/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/monitoring.coreos.com/servicemonitor_v1.json
# /metrics requires LiteLLM API-key auth (default since v1.85.0) — scrape with the
# master key. prometheus-operator reads the credentials Secret from this
# ServiceMonitor's own namespace (ai), where litellm-auth already lives.
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: litellm
spec:
jobLabel: app
selector:
matchLabels:
app: litellm
endpoints:
- port: http
path: /metrics
authorization:
type: Bearer
credentials:
name: litellm-auth
key: LITELLM_MASTER_KEY