mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-04 01:48:57 +00:00
108 lines
3.6 KiB
YAML
108 lines
3.6 KiB
YAML
{{- if .Values.dataManager.enabled }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "litellm.fullname" . }}-data-manager
|
|
labels:
|
|
{{- include "litellm.dataManagerLabels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.dataManager.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "litellm.dataManagerSelectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
{{- if .Values.proxyConfigMap.create }}
|
|
checksum/config: {{ include (print $.Template.BasePath "/configmap-litellm.yaml") . | sha256sum }}
|
|
{{- end }}
|
|
{{- with .Values.podAnnotations }}
|
|
{{- tpl (toYaml .) $ | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "litellm.dataManagerLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "litellm.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: data-manager
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
command: {{ toYaml .Values.dataManager.command | nindent 12 }}
|
|
env:
|
|
{{- include "litellm.proxyEnv" . | nindent 12 }}
|
|
{{- if not (hasKey (default dict .Values.envVars) "CONFIG_FILE_PATH") }}
|
|
- name: CONFIG_FILE_PATH
|
|
value: /etc/litellm/config.yaml
|
|
{{- end }}
|
|
envFrom:
|
|
{{- range .Values.environmentSecrets }}
|
|
- secretRef:
|
|
name: {{ . }}
|
|
{{- end }}
|
|
{{- range .Values.environmentConfigMaps }}
|
|
- configMapRef:
|
|
name: {{ . }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.dataManager.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: litellm-config
|
|
mountPath: /etc/litellm/config.yaml
|
|
subPath: config.yaml
|
|
{{- if .Values.securityContext.readOnlyRootFilesystem }}
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
- name: cache
|
|
mountPath: /.cache
|
|
- name: npm
|
|
mountPath: /.npm
|
|
{{- end }}
|
|
{{- with .Values.volumeMounts }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
volumes:
|
|
{{- if .Values.securityContext.readOnlyRootFilesystem }}
|
|
- name: tmp
|
|
emptyDir:
|
|
sizeLimit: 500Mi
|
|
- name: cache
|
|
emptyDir:
|
|
sizeLimit: 500Mi
|
|
- name: npm
|
|
emptyDir:
|
|
sizeLimit: 500Mi
|
|
{{- end }}
|
|
- name: litellm-config
|
|
configMap:
|
|
{{- if .Values.proxyConfigMap.create }}
|
|
name: {{ include "litellm.fullname" . }}-config
|
|
{{- else }}
|
|
name: {{ .Values.proxyConfigMap.name }}
|
|
{{- end }}
|
|
items:
|
|
- key: {{ .Values.proxyConfigMap.key | default "config.yaml" }}
|
|
path: "config.yaml"
|
|
{{- with .Values.volumes }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|