{{- if .Values.monolith.enabled }}
LiteLLM monolith: release {{ .Release.Name }} in namespace {{ .Release.Namespace }}, image {{ include "litellm.image" . }}

One Deployment runs the full proxy (gateway routes, management routes and the Admin UI):
  - proxy    : Service {{ include "litellm.workload.fullname" . }} on port {{ .Values.gateway.service.port }}

Port-forward:
  kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "litellm.workload.fullname" . }} {{ .Values.gateway.service.port }}

The monolith takes its configuration from the gateway.* values (config, resources, probes, hpa, pdb, keda,
metricsServer, collector, volumes, env, scheduling). backend.* and ui.* are ignored while monolith.enabled is true
{{- else }}
LiteLLM componentized: release {{ .Release.Name }} in namespace {{ .Release.Namespace }}, image {{ include "litellm.image" . }}

Components:
{{- if .Values.gateway.enabled }}
  - gateway  : Service {{ include "litellm.gateway.fullname" . }} on port {{ .Values.gateway.service.port }}
{{- end }}
{{- if .Values.backend.enabled }}
  - backend  : Service {{ include "litellm.backend.fullname" . }} on port {{ .Values.backend.service.port }}
{{- end }}
{{- if .Values.ui.enabled }}
  - ui       : Service {{ include "litellm.ui.fullname" . }} on port {{ .Values.ui.service.port }}
{{- end }}

Port-forward examples:
  kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "litellm.gateway.fullname" . }} {{ .Values.gateway.service.port }}
  kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "litellm.backend.fullname" . }} {{ .Values.backend.service.port }}
  kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "litellm.ui.fullname" . }} {{ .Values.ui.service.port }}

Set monolith.enabled=true to run everything as one Deployment instead
{{- end }}

Reminders:
  - Sensitive values come from Secret references only. Before installing, set:
      - masterKey.secretName                                   (Secret with the proxy master key, or
                                                                masterKey.generate: true with secretName "" to let the chart create one)
      - database.writer.{host,port,dbname}                     (writer connection pieces)
      - database.writer.passwordSecret.{name,usernameKey,passwordKey}
                                                               (Secret holding the writer DB username + password)
      - database.writer.passwordSecret.{hostKey,urlKey}        (optional, read writer host or full URL from that Secret)
      - database.writer.useIAMAuth: true                       (optional: chart sets IAM_TOKEN_DB_AUTH=true and
                                                                omits DATABASE_PASSWORD / DATABASE_URL so the proxy
                                                                mints the URL from an IAM token at startup)
      - database.reader.host / database.reader.passwordSecret.{hostKey,urlKey}
                                                                (optional, enables read-replica routing. The Secret
                                                                name is required for hostKey, urlKey, and for host
                                                                with password auth)
      - database.reader.useIAMAuth: true                       (optional, requires database.writer.useIAMAuth: true;
                                                                chart emits DATABASE_*_READ_REPLICA env vars and
                                                                omits DATABASE_PASSWORD_READ_REPLICA /
                                                                DATABASE_URL_READ_REPLICA so the proxy mints the
                                                                reader URL from an IAM token at startup)
      - redis.host                                             (optional: the proxy's coordination Redis)
      - redis.passwordSecret.name                              (optional: set when redis.host is provided and the
                                                                cache requires auth)
      - redis.passwordSecret.{hostKey,urlKey}                  (optional, read Redis host or full URL from that Secret)
                                                                (the Secret name is required when either key is set)
      - redis.cluster: true                                    (optional: chart sets REDIS_CLUSTER_NODES from
                                                                redis.host / redis.port so the proxy's Cache()
                                                                constructs a RedisClusterCache; the cluster client
                                                                discovers remaining nodes from CLUSTER SLOTS)
  - Per-component extras (gateway / backend / ui; gateway.* also drives the monolith):
      - {component}.extraEnv / envConfigMaps / envSecrets      (the latter two are lists of resource names rendered
                                                                as envFrom configMapRef / secretRef)
      - {component}.logLevel                                   (renders as LITELLM_LOG)
      - gateway.config.proxy_config                            (rendered into a ConfigMap and mounted at
                                                                /app/config/config.yaml; read via CONFIG_FILE_PATH)
      - {component}.pdb.{enabled,minAvailable,maxUnavailable}  (per-component PodDisruptionBudget; disabled by
                                                                default: with hpa.minReplicas of 1, minAvailable: 1
                                                                would block node drains)
      - {component}.topologySpreadConstraints                  (standard k8s list, e.g. spread replicas across
                                                                topology.kubernetes.io/zone)
  - Enable ingress.enabled=true to dispatch / to ui, gateway data-plane prefixes to gateway and the catch-all to
    backend; in monolith mode every path goes to the monolith Service
