diff --git a/helm/litellm/templates/backend/deployment.yaml b/helm/litellm/templates/backend/deployment.yaml index 0db2f0b3d43..6370f581d71 100644 --- a/helm/litellm/templates/backend/deployment.yaml +++ b/helm/litellm/templates/backend/deployment.yaml @@ -7,6 +7,9 @@ metadata: {{- include "litellm.commonLabels" . | nindent 4 }} app.kubernetes.io/component: backend spec: + {{- if not .Values.backend.hpa.enabled }} + replicas: {{ .Values.backend.replicaCount }} + {{- end }} {{- with .Values.backend.strategy }} strategy: {{- toYaml . | nindent 4 }} diff --git a/helm/litellm/templates/gateway/deployment.yaml b/helm/litellm/templates/gateway/deployment.yaml index c06cc9583a0..0c537b1bdeb 100644 --- a/helm/litellm/templates/gateway/deployment.yaml +++ b/helm/litellm/templates/gateway/deployment.yaml @@ -7,6 +7,9 @@ metadata: {{- include "litellm.commonLabels" . | nindent 4 }} app.kubernetes.io/component: gateway spec: + {{- if not .Values.gateway.hpa.enabled }} + replicas: {{ .Values.gateway.replicaCount }} + {{- end }} {{- with .Values.gateway.strategy }} strategy: {{- toYaml . | nindent 4 }} diff --git a/helm/litellm/templates/ui/deployment.yaml b/helm/litellm/templates/ui/deployment.yaml index b992b347bad..b794418b7e9 100644 --- a/helm/litellm/templates/ui/deployment.yaml +++ b/helm/litellm/templates/ui/deployment.yaml @@ -7,6 +7,9 @@ metadata: {{- include "litellm.commonLabels" . | nindent 4 }} app.kubernetes.io/component: ui spec: + {{- if not .Values.ui.hpa.enabled }} + replicas: {{ .Values.ui.replicaCount }} + {{- end }} {{- with .Values.ui.strategy }} strategy: {{- toYaml . | nindent 4 }} diff --git a/helm/litellm/values.yaml b/helm/litellm/values.yaml index 4ca54131d6a..5f881e9313a 100644 --- a/helm/litellm/values.yaml +++ b/helm/litellm/values.yaml @@ -389,6 +389,10 @@ gateway: # maxUnavailable: 0 # maxSurge: 1 strategy: {} + # Fixed replica count, rendered as the Deployment's spec.replicas only when + # hpa.enabled is false (with the HPA on, the autoscaler owns the count and + # minReplicas/maxReplicas bound it). + replicaCount: 1 # Optional startupProbe. Empty by default, so existing installs are unchanged # and liveness/readiness apply from container start. Set it to gate # liveness/readiness until a slow cold start finishes — a high failureThreshold @@ -522,6 +526,8 @@ backend: timeoutSeconds: 10 # Same shape as gateway.strategy. strategy: {} + # Same shape as gateway.replicaCount. + replicaCount: 1 # Optional startupProbe; same shape as gateway.startupProbe. Empty by default. startupProbe: {} hpa: @@ -588,6 +594,8 @@ ui: periodSeconds: 10 # Same shape as gateway.strategy. strategy: {} + # Same shape as gateway.replicaCount. + replicaCount: 1 # Optional startupProbe; same shape as gateway.startupProbe. Empty by default. startupProbe: {} hpa: