apiVersion: apps/v1 kind: Deployment metadata: name: litellm namespace: nxtgauge-ai labels: app: litellm spec: replicas: 1 selector: matchLabels: app: litellm template: metadata: labels: app: litellm spec: containers: - name: litellm # This app was never included in Flux's root kustomization (see # clusters/production/kustomization.yaml), so it was only ever # deployed by a one-off manual `kubectl apply` and has since # drifted from this file. Corrected to match what's actually # running live (the real upstream image) rather than # registry.nxtgauge.com/litellm:latest, which doesn't appear to # exist/be maintained — using it would have broken a working # deployment the moment this file was wired back into GitOps. image: ghcr.io/berriai/litellm:latest command: - "/bin/bash" args: - "-c" - "cat /app/config.yaml && exec litellm --config /app/config.yaml --port 4000 --host 0.0.0.0" ports: - containerPort: 4000 name: http env: - name: LITELLM_MASTER_KEY valueFrom: secretKeyRef: name: litellm-secrets key: LITELLM_MASTER_KEY - name: LITELLM_LOG_LEVEL value: "DEBUG" # Present on the live (drifted) deployment but missing from this # file — LiteLLM's proxy tries to reach Postgres for spend # tracking/virtual-key storage regardless of whether # general_settings.database_url is set in config.yaml, and # fails startup entirely if DATABASE_URL is unset (discovered # when adopting this file caused a crash loop: the litellm-db- # credentials secret already existed, this file just never # referenced it). - name: DATABASE_URL valueFrom: secretKeyRef: name: litellm-db-credentials key: DATABASE_URL volumeMounts: - name: config mountPath: /app/config.yaml subPath: config.yaml readOnly: true resources: requests: cpu: 100m memory: 256Mi livenessProbe: tcpSocket: port: 4000 initialDelaySeconds: 60 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: tcpSocket: port: 4000 initialDelaySeconds: 30 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 3 volumes: - name: config configMap: name: litellm-config