mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-01 01:18:34 +00:00
* feat(proxy): share database connections across workers with an in-container pgbouncer Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(proxy): parse pgbouncer options iteratively to satisfy the recursion gate Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(proxy): refuse pgbouncer with token db auth and retry failed pooler restarts Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(proxy): build pgbouncer 1.25.2 from a pinned source archive and verify pooler replacements The public Wolfi repository only carries pgbouncer 1.24.1-r3, which the image scan rejects (CVE-2026-6664, CVE-2026-6665, CVE-2026-6666, CVE-2025-12819). All three images now compile the checksummed 1.25.2 release in a builder stage. The supervisor now waits for a replacement pooler to listen before treating it as recovered, ends and retries one that never does, and takes the same lock for stop() and spawn so no replacement can be started after shutdown began. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(proxy): refuse to start pgbouncer on a loopback port another process already owns Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(proxy): count pgbouncer ready only once its own unix socket answers, not any listener on the port Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(proxy): refuse pgbouncer older than 1.19, whose unix socket cannot vouch for the tcp port Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * feat(helm,terraform): expose the in-container pgbouncer pool for the componentized gateway Add database.connectionPool to helm/litellm and gateway_connection_pool_* to terraform/litellm/aws so the componentized gateway can receive the LITELLM_PGBOUNCER_* env the classic image already honours. Both reject the pool under IAM or Entra token auth at render/plan time: the pooler holds one static database password for the life of the pod or task. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * feat(gateway): launch the componentized gateway image through a pgbouncer-aware supervisor (#40592) The componentized gateway image started uvicorn directly, so the in-container PgBouncer never ran for it: every worker opened its own Prisma pool to the database. It also passed no keep-alive timeout, so behind a load balancer with a 60s idle timeout uvicorn's 5s default closed idle connections first and the balancer returned 502s on scale-out gateway.launch assembles DATABASE_URL, starts PgBouncer once per pod when LITELLM_PGBOUNCER_ENABLED is set, hands the workers the loopback URL and then runs uvicorn on gateway.main:app with KEEPALIVE_TIMEOUT as --timeout-keep-alive. The image builds PgBouncer 1.25.2 from a checksummed tarball, copies the compiled Rust extension into the /app source tree it imports from (it was only in site-packages, which PYTHONPATH=/app shadows) and asserts the native bridge loads. The app user is added to stats_users so operators can read the PgBouncer console with the application credentials The supervisor returns the pooled URL instead of writing into the mapping it was handed, a database user whose name PgBouncer would split into several stats_users entries is refused before the config is written, and the launcher tests drive main() with an injected serve callable Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs(terraform): describe the gateway.launch pooler entrypoint in the aws module README Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(proxy): run pgbouncer exit hooks only in the parent and copy the CA into the runtime dir Gunicorn workers inherit the parent's atexit table, so a recycled worker (max_requests) stopped the shared pooler and removed its runtime dir, then hung in the inherited Popen lock. The hooks now no-op unless os.getpid() is the process that started PgBouncer A verified TLS upstream named the operator's CA bundle directly, which is often a 0600 root-owned file that nobody (the user PgBouncer drops to) cannot read, so every server connection failed with "failed to load CA". The bundle is copied into the runtime dir next to the ini and chowned with it Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * feat(terraform): run the gateway through gateway.launch and add the gcp connection-pool variables Cloud Run and ECS overrode the image command with uvicorn gateway.main:app, which skips the supervisor that starts the in-container PgBouncer, so LITELLM_PGBOUNCER_ENABLED was inert on both stacks. Both now exec python -m gateway.launch (under ddtrace-run when USE_DDTRACE is set), and the gcp module gains gateway_connection_pool_enabled / gateway_pool_max_db_connections / gateway_pool_max_client_conn wired to the gateway service only The test_launch password_env fixture now restores DATABASE_URL even when it was unset: monkeypatch.delenv records nothing for an absent var, so main() left postgresql://...@db.internal in the xdist worker's environ and the key-rotation e2e test in the same proxy-infra shard stopped skipping and tried to reach db.internal Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(pgbouncer): keep channel_binding and gssencmode off the loopback URL Prisma would demand TLS channel binding from a pooler that only speaks plain TCP on 127.0.0.1. Also pass the request the marketplace test started needing after #40518 landed on top of #40496 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: yassin <yassin@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
595 lines
22 KiB
YAML
595 lines
22 KiB
YAML
# Default values for litellm.
|
|
# This is a YAML-formatted file.
|
|
# Declare variables to be passed into your templates.
|
|
|
|
replicaCount: 1
|
|
# numWorkers: 2
|
|
|
|
image:
|
|
# Bundles the prisma CLI and engines, which is what lets the migrations job
|
|
# and the proxy's own schema check run without network access.
|
|
repository: ghcr.io/berriai/litellm
|
|
pullPolicy: Always
|
|
# Overrides the image tag whose default is the chart appVersion.
|
|
# tag: "latest"
|
|
tag: ""
|
|
|
|
imagePullSecrets: []
|
|
nameOverride: "litellm"
|
|
fullnameOverride: ""
|
|
|
|
serviceAccount:
|
|
# Specifies whether a service account should be created
|
|
create: false
|
|
# Automatically mount a ServiceAccount's API credentials?
|
|
automount: true
|
|
# Annotations to add to the service account
|
|
annotations: {}
|
|
# The name of the service account to use.
|
|
# If not set and create is true, a name is generated using the fullname template
|
|
name: ""
|
|
|
|
# annotations for litellm deployment
|
|
deploymentAnnotations: {}
|
|
deploymentLabels: {}
|
|
deploymentMinReadySeconds: 0
|
|
|
|
# annotations for litellm pods
|
|
podAnnotations: {}
|
|
podLabels: {}
|
|
|
|
# -- Deployment strategy configuration
|
|
# Example:
|
|
# type: RollingUpdate
|
|
# rollingUpdate:
|
|
# maxUnavailable: 0
|
|
# maxSurge: 1
|
|
strategy: {}
|
|
|
|
terminationGracePeriodSeconds: 90
|
|
topologySpreadConstraints:
|
|
[]
|
|
# - maxSkew: 1
|
|
# topologyKey: kubernetes.io/hostname
|
|
# whenUnsatisfiable: DoNotSchedule
|
|
# labelSelector:
|
|
# matchLabels:
|
|
# app: litellm
|
|
|
|
# At the time of writing, the litellm docker image requires write access to the
|
|
# filesystem on startup so that prisma can install some dependencies.
|
|
podSecurityContext: {}
|
|
securityContext:
|
|
{}
|
|
# capabilities:
|
|
# drop:
|
|
# - ALL
|
|
# readOnlyRootFilesystem: false
|
|
# runAsNonRoot: true
|
|
# runAsUser: 1000
|
|
|
|
# A list of Kubernetes Secret objects that will be exported to the LiteLLM proxy
|
|
# pod as environment variables. These secrets can then be referenced in the
|
|
# configuration file (or "litellm" ConfigMap) with `os.environ/<Env Var Name>`
|
|
environmentSecrets:
|
|
[]
|
|
# - litellm-env-secret
|
|
|
|
# A list of Kubernetes ConfigMap objects that will be exported to the LiteLLM proxy
|
|
# pod as environment variables. The ConfigMap kv-pairs can then be referenced in the
|
|
# configuration file (or "litellm" ConfigMap) with `os.environ/<Env Var Name>`
|
|
environmentConfigMaps:
|
|
[]
|
|
# - litellm-env-configmap
|
|
|
|
service:
|
|
type: ClusterIP
|
|
port: 4000
|
|
# If service type is `LoadBalancer` you can
|
|
# optionally specify loadBalancerClass
|
|
# loadBalancerClass: tailscale
|
|
|
|
# Probes for LiteLLM gateway container
|
|
livenessProbe:
|
|
path: /health/liveliness
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 15
|
|
timeoutSeconds: 5
|
|
successThreshold: 1
|
|
failureThreshold: 5
|
|
|
|
readinessProbe:
|
|
path: /health/readiness
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
|
|
startupProbe:
|
|
path: /health/readiness
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
successThreshold: 1
|
|
failureThreshold: 30
|
|
|
|
ingress:
|
|
enabled: false
|
|
className: "nginx"
|
|
labels: {}
|
|
annotations:
|
|
{}
|
|
# kubernetes.io/ingress.class: nginx
|
|
# kubernetes.io/tls-acme: "true"
|
|
hosts:
|
|
- host: api.example.local
|
|
paths:
|
|
- path: /
|
|
pathType: ImplementationSpecific
|
|
tls: []
|
|
# - secretName: chart-example-tls
|
|
# hosts:
|
|
# - chart-example.local
|
|
|
|
# masterkey: changeit
|
|
|
|
# if set, use this secret for the master key; otherwise, autogenerate a new one
|
|
masterkeySecretName: ""
|
|
|
|
# if set, use this secret key for the master key; otherwise, use the default key
|
|
masterkeySecretKey: ""
|
|
|
|
# Optional: enterprise billable-request metering. When enabled, the proxy counts
|
|
# successful requests to inference, MCP, and A2A endpoints and pushes them to
|
|
# LiteLLM's collector over mutual TLS. Requires an enterprise license.
|
|
# The client certificate identifies the deployment, so it is mounted read-only
|
|
# from an existing Secret and never passed through the environment.
|
|
billingMetrics:
|
|
enabled: false
|
|
endpoint: https://telemetry.litellm.ai # collector to push the counter to
|
|
secretName: litellm-billing-metrics-mtls # existing Secret holding tls.crt and tls.key
|
|
# Only for private or test collectors whose server certificate is not on the
|
|
# public web PKI. The production collector needs no CA override.
|
|
caSecretName: "" # existing Secret holding ca.crt
|
|
exportIntervalMs: "" # push cadence; the proxy defaults to 60000
|
|
|
|
proxyConfigMap:
|
|
# when true, creates a new configmap
|
|
create: true
|
|
# if create is false and name is set, use existing ConfigMap
|
|
# create: false
|
|
# name: ""
|
|
# key: "config.yaml"
|
|
|
|
# The elements within proxy_config are rendered as config.yaml for the proxy
|
|
# Examples: https://github.com/BerriAI/litellm/tree/main/litellm/proxy/example_config_yaml
|
|
# Reference: https://docs.litellm.ai/docs/proxy/configs
|
|
proxy_config:
|
|
model_list:
|
|
# At least one model must exist for the proxy to start.
|
|
- model_name: gpt-3.5-turbo
|
|
litellm_params:
|
|
model: gpt-3.5-turbo
|
|
api_key: eXaMpLeOnLy
|
|
- model_name: fake-openai-endpoint
|
|
litellm_params:
|
|
model: openai/fake
|
|
api_key: fake-key
|
|
api_base: https://exampleopenaiendpoint-production.up.railway.app/
|
|
general_settings:
|
|
master_key: os.environ/PROXY_MASTER_KEY
|
|
|
|
# Serve Prometheus /metrics from a separate process (PROMETHEUS_METRICS_PORT)
|
|
# so a scrape never runs on an inference worker. Adds a `metrics` port to the
|
|
# container and a dedicated ClusterIP `<release>-metrics` Service, and the
|
|
# ServiceMonitor scrapes it instead of the proxy port. The separate port has
|
|
# no virtual-key auth: keep it off public ingress. Needs the proxy image
|
|
# v1.101.0 or newer.
|
|
metricsServer:
|
|
enabled: false
|
|
port: 4001
|
|
|
|
resources:
|
|
{}
|
|
# Unset by default so the chart installs on small clusters such as Minikube, and so an
|
|
# upgrade never leaves a running pod Pending. Production deployments should set these.
|
|
# A proxy at DB-connected steady state needs about 1 CPU and 4Gi of memory per worker;
|
|
# sizing below that gets the pod OOMKilled once traffic and DB connections ramp up.
|
|
# Scale both figures with --num_workers, then uncomment the lines below and remove the
|
|
# curly braces after 'resources:'. See "Recommended Machine Specifications" in
|
|
# https://docs.litellm.ai/docs/proxy/prod.
|
|
# requests:
|
|
# cpu: "1"
|
|
# memory: 4Gi
|
|
# limits:
|
|
# cpu: "1"
|
|
# memory: 4Gi
|
|
|
|
autoscaling:
|
|
enabled: false
|
|
minReplicas: 1
|
|
maxReplicas: 100
|
|
# 60 is the documented recommendation. See "Recommended Machine Specifications"
|
|
# in https://docs.litellm.ai/docs/proxy/prod. A new replica clears the startupProbe
|
|
# above only after up to failureThreshold x periodSeconds = 300 seconds, so a target
|
|
# high enough to trip near saturation adds capacity minutes after it was needed.
|
|
targetCPUUtilizationPercentage: 60
|
|
# Deliberately left unset rather than given a value. The prisma query engine's
|
|
# resident memory is a high-water mark that ratchets to the pod's worst-ever write
|
|
# and is never returned, so a memory target reads the largest write a pod ever did
|
|
# rather than what it is doing now, and replicas ratchet up without scaling back in.
|
|
# Memory is a floor to provision under 'resources', not a signal to scale on.
|
|
# targetMemoryUtilizationPercentage: 80
|
|
# behavior: {}
|
|
# Opt-in per-pod workload targets, rendered as autoscaling/v2 `Pods` metrics
|
|
# named `litellm_requests_per_second` and `litellm_tokens_per_second` with an
|
|
# AverageValue target, alongside whichever resource targets are set (the HPA
|
|
# follows the metric asking for the most replicas). A Prometheus Adapter must
|
|
# serve those two names on custom.metrics.k8s.io from the proxy's counters,
|
|
# grouped by the scrape target's `pod` label (enable serviceMonitor below so
|
|
# every pod is scraped on its own):
|
|
# litellm_requests_per_second:
|
|
# sum(rate(litellm_proxy_total_requests_metric_total{<<.LabelMatchers>>}[1m])) by (<<.GroupBy>>)
|
|
# litellm_tokens_per_second:
|
|
# sum(rate(litellm_total_tokens_metric_total{<<.LabelMatchers>>}[1m])) by (<<.GroupBy>>)
|
|
# rate() over [1m] is already per second, so no `* 60`. How fast the HPA
|
|
# reacts is set by that window, the scrape interval and the HPA sync period
|
|
# (15s by default), not by the unit: keep serviceMonitor.interval at 15s or
|
|
# faster so a 1m window holds at least 4 samples. averageValue takes SI
|
|
# suffixes, so "6M" is six million tokens per second per pod. Tokens are
|
|
# counted when a response completes, so TPS trails long streams.
|
|
targetRequestsPerSecond: ""
|
|
targetTokensPerSecond: ""
|
|
|
|
# Autoscaling with keda is mutually exclusive with hpa
|
|
keda:
|
|
enabled: false
|
|
minReplicas: 1
|
|
maxReplicas: 100
|
|
pollingInterval: 30
|
|
cooldownPeriod: 300
|
|
# fallback:
|
|
# failureThreshold: 3
|
|
# replicas: 11
|
|
restoreToOriginalReplicaCount: false
|
|
scaledObject:
|
|
annotations: {}
|
|
triggers: []
|
|
# - type: prometheus
|
|
# metadata:
|
|
# serverAddress: http://<prometheus-host>:9090
|
|
# metricName: http_requests_total
|
|
# threshold: '100'
|
|
# query: sum(rate(http_requests_total{deployment="my-deployment"}[2m]))
|
|
# First-class Prometheus triggers on the proxy's own request and token
|
|
# counters, appended to `triggers`. Each target is the per-second load one
|
|
# replica should carry: KEDA divides the release-wide
|
|
# `sum(rate(<counter>[1m]))` by it to pick the replica count. Thresholds
|
|
# are plain numbers (KEDA parses them as floats, no SI suffixes). The
|
|
# queries select samples by the release namespace and the `job` label the
|
|
# chart's ServiceMonitor produces (the metrics Service name), so enable
|
|
# serviceMonitor below together with metricsServer: the http port serves
|
|
# /metrics/ behind virtual-key auth and answers an unauthenticated scrape
|
|
# with 401. Reaction time comes from the [1m] window, the scrape interval
|
|
# and pollingInterval above, so keep both at 15s or faster. Tokens are
|
|
# counted at completion, so TPS trails long streams. serverAddress is
|
|
# required once either target is set.
|
|
prometheus:
|
|
serverAddress: ""
|
|
requestsPerSecond: ""
|
|
tokensPerSecond: ""
|
|
behavior: {}
|
|
# scaleDown:
|
|
# stabilizationWindowSeconds: 300
|
|
# policies:
|
|
# - type: Pods
|
|
# value: 1
|
|
# periodSeconds: 180
|
|
# scaleUp:
|
|
# stabilizationWindowSeconds: 300
|
|
# policies:
|
|
# - type: Pods
|
|
# value: 2
|
|
# periodSeconds: 60
|
|
|
|
# Additional volumes on the output Deployment definition.
|
|
volumes: []
|
|
# - name: foo
|
|
# secret:
|
|
# secretName: mysecret
|
|
# optional: false
|
|
|
|
# Additional volumeMounts on the output Deployment definition.
|
|
volumeMounts: []
|
|
# - name: foo
|
|
# mountPath: "/etc/foo"
|
|
# readOnly: true
|
|
|
|
nodeSelector: {}
|
|
|
|
tolerations: []
|
|
|
|
affinity: {}
|
|
|
|
db:
|
|
# Use an existing postgres server/cluster
|
|
useExisting: false
|
|
|
|
# How to connect to the existing postgres server/cluster
|
|
endpoint: localhost
|
|
database: litellm
|
|
url: postgresql://$(DATABASE_USERNAME):$(DATABASE_PASSWORD)@$(DATABASE_HOST)/$(DATABASE_NAME)
|
|
secret:
|
|
name: postgres
|
|
usernameKey: username
|
|
passwordKey: password
|
|
# Optional: when set, DATABASE_HOST will be sourced from this secret key instead of db.endpoint
|
|
endpointKey: ""
|
|
# Optional: when set, DATABASE_URL_READ_REPLICA will be sourced from this
|
|
# secret key instead of db.readReplicaUrl. Prefer this over the plain
|
|
# value: read-replica URLs typically embed credentials, and a value
|
|
# written to db.readReplicaUrl ends up visible in the rendered pod spec
|
|
# and the Helm release secret.
|
|
readReplicaUrlKey: ""
|
|
# Optional: when set, a DATABASE_READER_HOST env var is sourced from this
|
|
# secret key, so db.readReplicaUrl can compose the reader URL from
|
|
# individual secret components, e.g.
|
|
# postgresql://$(DATABASE_USERNAME):$(DATABASE_PASSWORD)@$(DATABASE_READER_HOST):5432/$(DATABASE_NAME)
|
|
# Use this when your secret store holds the bare reader hostname rather
|
|
# than a full connection URL. Only takes effect when readReplicaUrl is
|
|
# set; ignored when readReplicaUrlKey is set.
|
|
readReplicaEndpointKey: ""
|
|
|
|
# Optional read-replica routing. When set, the proxy sends read-only
|
|
# queries (find_*, count, group_by, query_raw/_first) to this URL while
|
|
# writes continue to go to db.url. Useful for Aurora-style clusters with
|
|
# separate reader/writer endpoints. Leave empty to keep single-DB behavior.
|
|
# When IAM_TOKEN_DB_AUTH is enabled, the reader URL is auto-refreshed
|
|
# alongside the writer (host/port/user/db are parsed from this URL once
|
|
# at startup; only the IAM token rotates).
|
|
#
|
|
# If the URL embeds credentials, prefer db.secret.readReplicaUrlKey over
|
|
# this field — the plain value is rendered into the pod spec and the
|
|
# Helm release secret. This field is intended for credential-less URLs
|
|
# only (e.g. when IAM_TOKEN_DB_AUTH supplies the token at runtime).
|
|
readReplicaUrl: ""
|
|
|
|
# In-container connection pool (PgBouncer, transaction mode) shared by every
|
|
# worker in the pod. Without it each --num_workers worker opens its own
|
|
# connection_limit connections to Postgres, so a pod's footprint against the
|
|
# database's connection ceiling is workers x connection_limit and grows with
|
|
# every replica. With it, the pod holds at most maxDbConnections upstream
|
|
# connections no matter how many workers run; the workers connect to the pool
|
|
# over loopback, with no extra network hop. Migrations still go straight to
|
|
# Postgres. Starting profile for numWorkers: 4 is maxDbConnections: 20, so
|
|
# a database with a 5000-connection ceiling fits roughly 200 replicas.
|
|
connectionPool:
|
|
enabled: false
|
|
maxDbConnections: 20
|
|
maxClientConn: 1000
|
|
|
|
# Use the Stackgres Helm chart to deploy an instance of a Stackgres cluster.
|
|
# The Stackgres Operator must already be installed within the target
|
|
# Kubernetes cluster.
|
|
# TODO: Stackgres deployment currently unsupported
|
|
useStackgresOperator: false
|
|
|
|
# Use the Postgres Helm chart to create a single node, stand alone postgres
|
|
# instance. See the "postgresql" top level key for additional configuration.
|
|
deployStandalone: true
|
|
|
|
# Lifecycle hooks for the LiteLLM container
|
|
#
|
|
# Prefer the native /health/drain preStop hook over a fixed `sleep`: it marks
|
|
# the pod NotReady and blocks only until in-flight requests actually finish
|
|
# (bounded by GRACEFUL_SHUTDOWN_TIMEOUT, default 30s), instead of always
|
|
# waiting the worst-case duration. The drain runs once (the preStop hook and
|
|
# the SIGTERM handler share it), so set terminationGracePeriodSeconds a few
|
|
# seconds above GRACEFUL_SHUTDOWN_TIMEOUT to leave room for teardown before
|
|
# SIGKILL.
|
|
#
|
|
# /health/drain is off by default; enable it with
|
|
# general_settings.enable_drain_endpoint: true. The kubelet calls preStop
|
|
# hooks without proxy credentials, so when the health port is reachable from
|
|
# other pods (the common case) also set
|
|
# general_settings.drain_endpoint_token (or the DRAIN_ENDPOINT_TOKEN env
|
|
# var) and send the same value on the X-Drain-Token header from the hook.
|
|
# Calls missing/wrong the token get a 401 and have no side effect.
|
|
# Example:
|
|
# lifecycle:
|
|
# preStop:
|
|
# httpGet:
|
|
# path: /health/drain
|
|
# port: 4000
|
|
# httpHeaders:
|
|
# - name: X-Drain-Token
|
|
# value: <same value as drain_endpoint_token>
|
|
lifecycle: {}
|
|
|
|
# Settings for Bitnami postgresql chart (if db.deployStandalone is true, ignored
|
|
# otherwise)
|
|
#
|
|
# Bitnami retired the versioned tags under docker.io/bitnami and republished the
|
|
# archived builds under docker.io/bitnamilegacy, so the subchart's own image
|
|
# defaults no longer resolve. The repository below points at the same build the
|
|
# subchart was released with, which keeps the on-disk data directory layout
|
|
# identical for existing installs.
|
|
#
|
|
# Keep the tag pinned. docker.io/bitnami still publishes a floating `latest`,
|
|
# and starting a newer PostgreSQL major against an existing data directory
|
|
# leaves the server refusing to boot ("database files are incompatible with
|
|
# server") with no way back other than a dump taken beforehand. Crossing a major
|
|
# version is a dump-and-restore, not an image bump. The chart refuses to render
|
|
# an unpinned tag for this reason
|
|
postgresql:
|
|
architecture: standalone
|
|
image:
|
|
repository: bitnamilegacy/postgresql
|
|
tag: 16.2.0-debian-12-r6
|
|
volumePermissions:
|
|
image:
|
|
repository: bitnamilegacy/os-shell
|
|
tag: 12-debian-12-r16
|
|
metrics:
|
|
image:
|
|
repository: bitnamilegacy/postgres-exporter
|
|
tag: 0.15.0-debian-12-r14
|
|
auth:
|
|
username: litellm
|
|
database: litellm
|
|
|
|
# You should override these on the helm command line with
|
|
# `--set postgresql.auth.postgres-password=<some good password>,postgresql.auth.password=<some good password>`
|
|
password: NoTaGrEaTpAsSwOrD
|
|
postgres-password: NoTaGrEaTpAsSwOrD
|
|
|
|
# A secret is created by this chart (litellm-helm) with the credentials that
|
|
# the new Postgres instance should use.
|
|
# existingSecret: ""
|
|
# secretKeys:
|
|
# userPasswordKey: password
|
|
|
|
# Redis is the proxy's coordination store: cross-pod tpm/rpm rate limits, spend
|
|
# tracking, and the pod lock manager. Enabling this deploys the bundled Redis
|
|
# subchart, wires REDIS_HOST / REDIS_PORT / REDIS_PASSWORD into the proxy, and
|
|
# renders a `general_settings.coordination_redis` block into the proxy config.
|
|
#
|
|
# To point at an existing Redis instead, leave `enabled: false` and pass a
|
|
# secret for REDIS_HOST, REDIS_PORT, REDIS_PASSWORD or REDIS_URL; the proxy
|
|
# falls back to those env vars for coordination. Set `cache: true` in the proxy
|
|
# config only if you also want LLM response caching, which is independent of
|
|
# coordination
|
|
#
|
|
# When `redis.sentinel.enabled` is set, the coordination block is rendered with
|
|
# `sentinel_nodes` and `service_name` (from `redis.sentinel.masterSet`) instead
|
|
# of host/port, because a plain Redis client cannot talk to the sentinel port
|
|
#
|
|
# The image repositories carry the same bitnamilegacy repoint as postgresql
|
|
# above; the versioned tags the subchart ships with are gone from
|
|
# docker.io/bitnami
|
|
redis:
|
|
enabled: false
|
|
architecture: standalone
|
|
image:
|
|
repository: bitnamilegacy/redis
|
|
tag: 7.2.4-debian-12-r9
|
|
sentinel:
|
|
image:
|
|
repository: bitnamilegacy/redis-sentinel
|
|
tag: 7.2.4-debian-12-r7
|
|
metrics:
|
|
image:
|
|
repository: bitnamilegacy/redis-exporter
|
|
tag: 1.58.0-debian-12-r4
|
|
volumePermissions:
|
|
image:
|
|
repository: bitnamilegacy/os-shell
|
|
tag: 12-debian-12-r16
|
|
sysctl:
|
|
image:
|
|
repository: bitnamilegacy/os-shell
|
|
tag: 12-debian-12-r16
|
|
kubectl:
|
|
image:
|
|
repository: bitnamilegacy/kubectl
|
|
tag: 1.29.2-debian-12-r3
|
|
coordination:
|
|
# Set to false to keep the bundled Redis for response caching only and leave
|
|
# `general_settings.coordination_redis` out of the rendered config. A
|
|
# `coordination_redis` block you define yourself in `proxy_config` always wins
|
|
enabled: true
|
|
|
|
# Prisma migration job settings
|
|
migrationJob:
|
|
enabled: true # Enable or disable the schema migration Job
|
|
retries: 3 # Number of retries for the Job in case of failure
|
|
backoffLimit: 4 # Backoff limit for Job restarts
|
|
# Wall-clock budget for the whole Job, shared across every `backoffLimit`
|
|
# retry rather than granted per attempt. Without it a migration that blocks
|
|
# on the database never fails, and when the Helm hook is enabled the release
|
|
# waits on it forever: `helm upgrade` and any GitOps controller driving it
|
|
# stop reconciling the whole chart until someone deletes the Job by hand.
|
|
# Set to null to opt out and restore the unbounded behaviour.
|
|
activeDeadlineSeconds: 1800
|
|
disableSchemaUpdate: false # Skip schema migrations for specific environments. When True, the job will exit with code 0.
|
|
# Optional service account for the migration job.
|
|
# Only used when migrationJob.hooks.helm.enabled=true and serviceAccount.create=true.
|
|
# In that case, pre-install/pre-upgrade hooks run before normal resources, so this defaults to "default".
|
|
serviceAccountName: ""
|
|
annotations: {}
|
|
ttlSecondsAfterFinished: 120
|
|
resources: {}
|
|
# Unset by default. This job runs the database migration and exits, so it does not
|
|
# need the steady-state headroom the proxy does; size it from your own migration
|
|
# runs rather than from the proxy figures above.
|
|
extraContainers: []
|
|
extraInitContainers: []
|
|
|
|
# Hook configuration
|
|
hooks:
|
|
argocd:
|
|
enabled: true
|
|
helm:
|
|
enabled: false
|
|
|
|
# Log level for the litellm proxy (sets LITELLM_LOG in the deployment env).
|
|
# Rendered as a direct `env:` entry, which in Kubernetes takes precedence over
|
|
# any `envFrom:` source. If you currently source LITELLM_LOG from an
|
|
# environmentSecret or environmentConfigMap, set `logLevel: ""` here to
|
|
# disable injection — otherwise this value silently overrides your secret /
|
|
# configmap entry.
|
|
#
|
|
# Setting LITELLM_LOG inside `envVars:` below also wins: the template skips
|
|
# this injection entirely when envVars already defines LITELLM_LOG.
|
|
logLevel: INFO
|
|
|
|
# Additional environment variables to be added to the deployment as a map of key-value pairs
|
|
envVars: {}
|
|
|
|
# USE_DDTRACE: "true"
|
|
# Additional environment variables to be added to the deployment as a list of k8s env vars
|
|
extraEnvVars: {}
|
|
|
|
# if you want to override the container command, you can do so here
|
|
command: {}
|
|
# if you want to override the container args, you can do so here
|
|
args: {}
|
|
|
|
# - name: EXTRA_ENV_VAR
|
|
# value: EXTRA_ENV_VAR_VALUE
|
|
# Additional Kubernetes resources to deploy with litellm
|
|
extraResources: []
|
|
|
|
# - apiVersion: v1
|
|
# kind: ConfigMap
|
|
# metadata:
|
|
# name: my-extra-config
|
|
# data:
|
|
# foo: bar
|
|
# Pod Disruption Budget
|
|
pdb:
|
|
enabled: false
|
|
# Set exactly one of the following. If both are set, minAvailable takes precedence.
|
|
minAvailable: null # e.g. "50%" or 1
|
|
maxUnavailable: null # e.g. 1 or "20%"
|
|
annotations: {}
|
|
labels: {}
|
|
|
|
serviceMonitor:
|
|
enabled: false
|
|
labels:
|
|
{}
|
|
# test: test
|
|
annotations:
|
|
{}
|
|
# kubernetes.io/test: test
|
|
interval: 15s
|
|
scrapeTimeout: 10s
|
|
relabelings: []
|
|
# - targetLabel: __meta_kubernetes_pod_node_name
|
|
# replacement: $1
|
|
# action: replace
|
|
namespaceSelector:
|
|
matchNames: []
|
|
# - test-namespace
|