From 975974b61b8dac703efdeda69b3ad5e0c84cf933 Mon Sep 17 00:00:00 2001 From: Lunik Date: Fri, 16 Feb 2024 22:21:11 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Refresh=20Helm=20chart=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lunik --- .gitignore | 4 +- .../litellm-helm/templates/deployment-ui.yaml | 89 ------------------- .../litellm-helm/templates/ingress-ui.yaml | 61 ------------- .../litellm-helm/templates/service-ui.yaml | 17 ---- .../{litellm-helm => litellm}/.helmignore | 0 .../{litellm-helm => litellm}/Chart.lock | 0 .../{litellm-helm => litellm}/Chart.yaml | 7 +- .../{litellm-helm => litellm}/README.md | 24 ++--- .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 12 --- .../templates/configmap-litellm.yaml | 0 .../templates/deployment.yaml} | 23 ++--- .../templates/hpa.yaml | 0 .../templates/ingress.yaml} | 2 +- .../templates/secret-dbcredentials.yaml | 2 +- .../templates/secret-masterkey.yaml | 2 +- .../templates/service.yaml} | 2 +- .../templates/serviceaccount.yaml | 0 .../templates/tests/test-connection.yaml | 2 +- .../{litellm-helm => litellm}/values.yaml | 69 ++------------ docs/my-website/docs/proxy/deploy.md | 29 ++++++ 21 files changed, 60 insertions(+), 285 deletions(-) delete mode 100644 deploy/charts/litellm-helm/templates/deployment-ui.yaml delete mode 100644 deploy/charts/litellm-helm/templates/ingress-ui.yaml delete mode 100644 deploy/charts/litellm-helm/templates/service-ui.yaml rename deploy/charts/{litellm-helm => litellm}/.helmignore (100%) rename deploy/charts/{litellm-helm => litellm}/Chart.lock (100%) rename deploy/charts/{litellm-helm => litellm}/Chart.yaml (96%) rename deploy/charts/{litellm-helm => litellm}/README.md (73%) rename deploy/charts/{litellm-helm => litellm}/templates/NOTES.txt (100%) rename deploy/charts/{litellm-helm => litellm}/templates/_helpers.tpl (79%) rename deploy/charts/{litellm-helm => litellm}/templates/configmap-litellm.yaml (100%) rename deploy/charts/{litellm-helm/templates/deployment-proxy.yaml => litellm/templates/deployment.yaml} (89%) rename deploy/charts/{litellm-helm => litellm}/templates/hpa.yaml (100%) rename deploy/charts/{litellm-helm/templates/ingress-proxy.yaml => litellm/templates/ingress.yaml} (96%) rename deploy/charts/{litellm-helm => litellm}/templates/secret-dbcredentials.yaml (87%) rename deploy/charts/{litellm-helm => litellm}/templates/secret-masterkey.yaml (75%) rename deploy/charts/{litellm-helm/templates/service-proxy.yaml => litellm/templates/service.yaml} (86%) rename deploy/charts/{litellm-helm => litellm}/templates/serviceaccount.yaml (100%) rename deploy/charts/{litellm-helm => litellm}/templates/tests/test-connection.yaml (92%) rename deploy/charts/{litellm-helm => litellm}/values.yaml (80%) diff --git a/.gitignore b/.gitignore index 00cd35c5b..de1c7598f 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,7 @@ ui/litellm-dashboard/node_modules ui/litellm-dashboard/next-env.d.ts ui/litellm-dashboard/package.json ui/litellm-dashboard/package-lock.json -deploy/charts/litellm-helm/*.tgz -deploy/charts/litellm-helm/charts/* +deploy/charts/litellm/*.tgz +deploy/charts/litellm/charts/* deploy/charts/*.tgz litellm/proxy/vertex_key.json diff --git a/deploy/charts/litellm-helm/templates/deployment-ui.yaml b/deploy/charts/litellm-helm/templates/deployment-ui.yaml deleted file mode 100644 index f949e2029..000000000 --- a/deploy/charts/litellm-helm/templates/deployment-ui.yaml +++ /dev/null @@ -1,89 +0,0 @@ -{{- if .Values.ui.enabled -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "litellm.fullname" . }}-ui - labels: - {{- include "litellm.labels" . | nindent 4 }} -spec: - {{- if not .Values.ui.autoscaling.enabled }} - replicas: {{ .Values.ui.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "litellm.ui.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "litellm.ui.labels" . | nindent 8 }} - {{- with .Values.ui.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "litellm.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.ui.podSecurityContext | nindent 8 }} - containers: - - name: {{ include "litellm.name" . }}-ui - securityContext: - {{- toYaml .Values.ui.securityContext | nindent 12 }} - image: "{{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag | default (printf "main-%s" .Chart.AppVersion) }}" - imagePullPolicy: {{ .Values.ui.image.pullPolicy }} - env: - - name: BASE_URL - value: {{ (index .Values.ui.ingress.hosts 0).host | default "example.com" }} - ports: - - name: http - containerPort: {{ .Values.ui.service.port }} - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - # Give the container time to start up. Up to 5 minutes (10 * 30 seconds) - startupProbe: - httpGet: - path: / - port: http - failureThreshold: 30 - periodSeconds: 10 - resources: - {{- toYaml .Values.ui.resources | nindent 12 }} - volumeMounts: - - name: tmp - mountPath: /tmp - {{- with .Values.ui.volumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - volumes: - - name: tmp - emptyDir: - sizeLimit: 500Mi - {{- with .Values.ui.volumes }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ui.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ui.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ui.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end -}} \ No newline at end of file diff --git a/deploy/charts/litellm-helm/templates/ingress-ui.yaml b/deploy/charts/litellm-helm/templates/ingress-ui.yaml deleted file mode 100644 index 791ccf2b0..000000000 --- a/deploy/charts/litellm-helm/templates/ingress-ui.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ui.ingress.enabled -}} -{{- $fullName := (printf "%s%s" (include "litellm.fullname" .) "-ui") -}} -{{- $svcPort := .Values.ui.service.port -}} -{{- if and .Values.ui.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ui.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ui.ingress.annotations "kubernetes.io/ingress.class" .Values.ui.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "litellm.ui.labels" . | nindent 4 }} - {{- with .Values.ui.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ui.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ui.ingress.className }} - {{- end }} - {{- if .Values.ui.ingress.tls }} - tls: - {{- range .Values.ui.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ui.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/deploy/charts/litellm-helm/templates/service-ui.yaml b/deploy/charts/litellm-helm/templates/service-ui.yaml deleted file mode 100644 index 50781899d..000000000 --- a/deploy/charts/litellm-helm/templates/service-ui.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.ui.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "litellm.fullname" . }}-ui - labels: - {{- include "litellm.labels" . | nindent 4 }} -spec: - type: {{ .Values.ui.service.type }} - ports: - - port: {{ .Values.ui.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - {{- include "litellm.ui.selectorLabels" . | nindent 4 }} -{{ end -}} \ No newline at end of file diff --git a/deploy/charts/litellm-helm/.helmignore b/deploy/charts/litellm/.helmignore similarity index 100% rename from deploy/charts/litellm-helm/.helmignore rename to deploy/charts/litellm/.helmignore diff --git a/deploy/charts/litellm-helm/Chart.lock b/deploy/charts/litellm/Chart.lock similarity index 100% rename from deploy/charts/litellm-helm/Chart.lock rename to deploy/charts/litellm/Chart.lock diff --git a/deploy/charts/litellm-helm/Chart.yaml b/deploy/charts/litellm/Chart.yaml similarity index 96% rename from deploy/charts/litellm-helm/Chart.yaml rename to deploy/charts/litellm/Chart.yaml index 80eaf87dd..6ecdebb50 100644 --- a/deploy/charts/litellm-helm/Chart.yaml +++ b/deploy/charts/litellm/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 # We can't call ourselves just "litellm" because then we couldn't publish to the # same OCI repository as the "litellm" OCI image -name: litellm-helm +name: litellm description: Call all LLM APIs using the OpenAI format # A chart can be either an 'application' or a 'library' chart. @@ -18,17 +18,16 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: v1.18.9 +appVersion: v1.24.5 dependencies: - name: "postgresql" version: ">=13.3.0" repository: oci://registry-1.docker.io/bitnamicharts condition: db.deployStandalone - diff --git a/deploy/charts/litellm-helm/README.md b/deploy/charts/litellm/README.md similarity index 73% rename from deploy/charts/litellm-helm/README.md rename to deploy/charts/litellm/README.md index bf87501b3..daba8aa68 100644 --- a/deploy/charts/litellm-helm/README.md +++ b/deploy/charts/litellm/README.md @@ -43,20 +43,6 @@ data: type: Opaque ``` -### LiteLLM Admin UI Settings - -| Name | Description | Value | -| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| `ui.enabled` | Should the LiteLLM Admin UI be deployed | `true` | -| `ui.replicaCount` | The number of LiteLLM Admin UI pods to be deployed | `1` | -| `ui.image.repository` | LiteLLM Admin UI image repository | `ghcr.io/berriai/litellm` | -| `ui.image.pullPolicy` | LiteLLM Admin UI image pull policy | `IfNotPresent` | -| `ui.image.tag` | Overrides the image tag whose default the latest version of LiteLLM at the time this chart was published. | `""` | -| `ui.imagePullSecrets` | Registry credentials for the above images. | `[]` | -| `ui.service.type` | Kubernetes Service type (e.g. `LoadBalancer`, `ClusterIP`, etc.) | `ClusterIP` | -| `ui.service.port` | TCP port that the Kubernetes Service will listen on. Also the TCP port within the Pod that the web server will listen on. | `8000` | -| `ui.ingress.*` | See [values.yaml](./values.yaml) for example settings | N/A | - ### Database Settings | Name | Description | Value | | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | @@ -86,18 +72,18 @@ type: Opaque ``` ## Accessing the Admin UI -When browsing to the URL published per the settings in `ui.ingress.*`, you will +When browsing to the URL published per the settings in `ingress.*`, you will be prompted for **Admin Configuration**. The **Proxy Endpoint** is the internal -(from the `litellm-ui` pod's perspective) URL published by the `litellm-proxy` +(from the `litellm` pod's perspective) URL published by the `-litellm` Kubernetes Service. If the deployment uses the default settings for this -service, the **Proxy Endpoint** should be set to `http://litellm-proxy:8000`. +service, the **Proxy Endpoint** should be set to `http://-litellm:8000`. The **Proxy Key** is the value specified for `masterkey` or, if a `masterkey` was not provided to the helm command line, the `masterkey` is a randomly -generated string stored in the `litellm-masterkey` Kubernetes Secret. +generated string stored in the `-litellm-masterkey` Kubernetes Secret. ```bash -kubectl -n litellm get secret litellm-masterkey -o jsonpath="{.data.masterkey}" +kubectl -n litellm get secret -litellm-masterkey -o jsonpath="{.data.masterkey}" ``` ## Admin UI Limitations diff --git a/deploy/charts/litellm-helm/templates/NOTES.txt b/deploy/charts/litellm/templates/NOTES.txt similarity index 100% rename from deploy/charts/litellm-helm/templates/NOTES.txt rename to deploy/charts/litellm/templates/NOTES.txt diff --git a/deploy/charts/litellm-helm/templates/_helpers.tpl b/deploy/charts/litellm/templates/_helpers.tpl similarity index 79% rename from deploy/charts/litellm-helm/templates/_helpers.tpl rename to deploy/charts/litellm/templates/_helpers.tpl index 7e7aa8f4c..b8893d07c 100644 --- a/deploy/charts/litellm-helm/templates/_helpers.tpl +++ b/deploy/charts/litellm/templates/_helpers.tpl @@ -41,14 +41,6 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }} -{{- define "litellm.ui.labels" -}} -helm.sh/chart: {{ include "litellm.chart" . }} -{{ include "litellm.ui.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} {{/* Selector labels @@ -57,10 +49,6 @@ Selector labels app.kubernetes.io/name: {{ include "litellm.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} -{{- define "litellm.ui.selectorLabels" -}} -app.kubernetes.io/name: {{ include "litellm.name" . }}-ui -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} {{/* Create the name of the service account to use diff --git a/deploy/charts/litellm-helm/templates/configmap-litellm.yaml b/deploy/charts/litellm/templates/configmap-litellm.yaml similarity index 100% rename from deploy/charts/litellm-helm/templates/configmap-litellm.yaml rename to deploy/charts/litellm/templates/configmap-litellm.yaml diff --git a/deploy/charts/litellm-helm/templates/deployment-proxy.yaml b/deploy/charts/litellm/templates/deployment.yaml similarity index 89% rename from deploy/charts/litellm-helm/templates/deployment-proxy.yaml rename to deploy/charts/litellm/templates/deployment.yaml index cdcd207c0..6ed112dac 100644 --- a/deploy/charts/litellm-helm/templates/deployment-proxy.yaml +++ b/deploy/charts/litellm/templates/deployment.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "litellm.fullname" . }}-proxy + name: {{ include "litellm.fullname" . }} labels: {{- include "litellm.labels" . | nindent 4 }} spec: @@ -41,12 +41,12 @@ spec: - name: DATABASE_USERNAME valueFrom: secretKeyRef: - name: {{ include "litellm.name" . }}-dbcredentials + name: {{ include "litellm.fullname" . }}-dbcredentials key: username - name: PGPASSWORD valueFrom: secretKeyRef: - name: {{ include "litellm.name" . }}-dbcredentials + name: {{ include "litellm.fullname" . }}-dbcredentials key: password - name: DATABASE_HOST value: {{ .Release.Name }}-postgresql @@ -108,12 +108,12 @@ spec: - name: DATABASE_USERNAME valueFrom: secretKeyRef: - name: {{ include "litellm.name" . }}-dbcredentials + name: {{ include "litellm.fullname" . }}-dbcredentials key: username - name: DATABASE_PASSWORD valueFrom: secretKeyRef: - name: {{ include "litellm.name" . }}-dbcredentials + name: {{ include "litellm.fullname" . }}-dbcredentials key: password - name: DATABASE_HOST value: {{ .Release.Name }}-postgresql @@ -140,7 +140,7 @@ spec: - name: PROXY_MASTER_KEY valueFrom: secretKeyRef: - name: {{ include "litellm.name" . }}-masterkey + name: {{ include "litellm.fullname" . }}-masterkey key: masterkey envFrom: {{- range .Values.environmentSecrets }} @@ -150,16 +150,7 @@ spec: args: - --config - /etc/litellm/config.yaml - # command: - # - bash - # - -c - # - | - # ls -la /etc/litellm/; cat /etc/litellm/config.yaml; export - # find / 2>/dev/null | grep -v -e '^/proc' -e '^/sys' -e '^/dev' >/tmp/before.list - # prisma generate - # find / 2>/dev/null | grep -v -e '^/proc' -e '^/sys' -e '^/dev' >/tmp/after.list - # diff -ruN /tmp/before.list /tmp/after.list - # sleep 3600 + - --run_gunicorn ports: - name: http containerPort: {{ .Values.service.port }} diff --git a/deploy/charts/litellm-helm/templates/hpa.yaml b/deploy/charts/litellm/templates/hpa.yaml similarity index 100% rename from deploy/charts/litellm-helm/templates/hpa.yaml rename to deploy/charts/litellm/templates/hpa.yaml diff --git a/deploy/charts/litellm-helm/templates/ingress-proxy.yaml b/deploy/charts/litellm/templates/ingress.yaml similarity index 96% rename from deploy/charts/litellm-helm/templates/ingress-proxy.yaml rename to deploy/charts/litellm/templates/ingress.yaml index 95bf83c99..09e8d715a 100644 --- a/deploy/charts/litellm-helm/templates/ingress-proxy.yaml +++ b/deploy/charts/litellm/templates/ingress.yaml @@ -1,5 +1,5 @@ {{- if .Values.ingress.enabled -}} -{{- $fullName := (printf "%s%s" (include "litellm.fullname" .) "-proxy") -}} +{{- $fullName := include "litellm.fullname" . -}} {{- $svcPort := .Values.service.port -}} {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} diff --git a/deploy/charts/litellm-helm/templates/secret-dbcredentials.yaml b/deploy/charts/litellm/templates/secret-dbcredentials.yaml similarity index 87% rename from deploy/charts/litellm-helm/templates/secret-dbcredentials.yaml rename to deploy/charts/litellm/templates/secret-dbcredentials.yaml index fc688effb..8851f5802 100644 --- a/deploy/charts/litellm-helm/templates/secret-dbcredentials.yaml +++ b/deploy/charts/litellm/templates/secret-dbcredentials.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: - name: {{ include "litellm.name" . }}-dbcredentials + name: {{ include "litellm.fullname" . }}-dbcredentials data: # Password for the "postgres" user postgres-password: {{ ( index .Values.postgresql.auth "postgres-password") | default "litellm" | b64enc }} diff --git a/deploy/charts/litellm-helm/templates/secret-masterkey.yaml b/deploy/charts/litellm/templates/secret-masterkey.yaml similarity index 75% rename from deploy/charts/litellm-helm/templates/secret-masterkey.yaml rename to deploy/charts/litellm/templates/secret-masterkey.yaml index 8b22b476c..57b854cc0 100644 --- a/deploy/charts/litellm-helm/templates/secret-masterkey.yaml +++ b/deploy/charts/litellm/templates/secret-masterkey.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: - name: {{ include "litellm.name" . }}-masterkey + name: {{ include "litellm.fullname" . }}-masterkey data: masterkey: {{ $masterkey | b64enc }} type: Opaque \ No newline at end of file diff --git a/deploy/charts/litellm-helm/templates/service-proxy.yaml b/deploy/charts/litellm/templates/service.yaml similarity index 86% rename from deploy/charts/litellm-helm/templates/service-proxy.yaml rename to deploy/charts/litellm/templates/service.yaml index 3c3c744b5..40e7f27f1 100644 --- a/deploy/charts/litellm-helm/templates/service-proxy.yaml +++ b/deploy/charts/litellm/templates/service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "litellm.fullname" . }}-proxy + name: {{ include "litellm.fullname" . }} labels: {{- include "litellm.labels" . | nindent 4 }} spec: diff --git a/deploy/charts/litellm-helm/templates/serviceaccount.yaml b/deploy/charts/litellm/templates/serviceaccount.yaml similarity index 100% rename from deploy/charts/litellm-helm/templates/serviceaccount.yaml rename to deploy/charts/litellm/templates/serviceaccount.yaml diff --git a/deploy/charts/litellm-helm/templates/tests/test-connection.yaml b/deploy/charts/litellm/templates/tests/test-connection.yaml similarity index 92% rename from deploy/charts/litellm-helm/templates/tests/test-connection.yaml rename to deploy/charts/litellm/templates/tests/test-connection.yaml index 1f072069c..d2a4034b1 100644 --- a/deploy/charts/litellm-helm/templates/tests/test-connection.yaml +++ b/deploy/charts/litellm/templates/tests/test-connection.yaml @@ -11,5 +11,5 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include "litellm.fullname" . }}:{{ .Values.service.port }}'] + args: ['{{ include "litellm.fullname" . }}:{{ .Values.service.port }}/health/readiness'] restartPolicy: Never diff --git a/deploy/charts/litellm-helm/values.yaml b/deploy/charts/litellm/values.yaml similarity index 80% rename from deploy/charts/litellm-helm/values.yaml rename to deploy/charts/litellm/values.yaml index 3c7131055..1b83fe801 100644 --- a/deploy/charts/litellm-helm/values.yaml +++ b/deploy/charts/litellm/values.yaml @@ -5,7 +5,9 @@ replicaCount: 1 image: - repository: ghcr.io/berriai/litellm + # Use "ghcr.io/berriai/litellm-database" for optimized image with database + # Alternatively, use "ghcr.io/berriai/litellm" for the default image + repository: ghcr.io/berriai/litellm-database pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. # tag: "main-latest" @@ -56,7 +58,7 @@ service: port: 8000 ingress: - enabled: true + enabled: false className: "nginx" annotations: {} # kubernetes.io/ingress.class: nginx @@ -71,6 +73,8 @@ ingress: # hosts: # - chart-example.local +# masterkey: changeit + # 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 @@ -159,61 +163,6 @@ postgresql: # A secret is created by this chart (litellm-helm) with the credentials that # the new Postgres instance should use. - existingSecret: litellm-dbcredentials - secretKeys: - userPasswordKey: password - -ui: - enabled: true - replicaCount: 1 - autoscaling: - enabled: false - image: - repository: ghcr.io/berriai/litellm-ui - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - # tag: "main-latest" - # TODO: Switch to BerryAI repo and tags if/when they provide a ui image - # https://github.com/BerriAI/litellm/pull/1505 - tag: "" - - service: - type: ClusterIP - port: 8501 - - ingress: - enabled: true - className: "nginx" - annotations: {} - hosts: - - host: ui.example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - - podAnnotations: {} - podLabels: {} - - podSecurityContext: - fsGroup: 1000 - - securityContext: - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - runAsNonRoot: true - runAsUser: 1000 - - resources: {} - - volumes: [] - - volumeMounts: [] - - nodeSelector: {} - - tolerations: [] - - affinity: {} \ No newline at end of file + # existingSecret: "" + # secretKeys: + # userPasswordKey: password diff --git a/docs/my-website/docs/proxy/deploy.md b/docs/my-website/docs/proxy/deploy.md index c3a84f1ea..f4a5dd8b2 100644 --- a/docs/my-website/docs/proxy/deploy.md +++ b/docs/my-website/docs/proxy/deploy.md @@ -151,6 +151,35 @@ kubectl port-forward service/litellm-service 4000:4000 Your OpenAI proxy server is now running on `http://0.0.0.0:4000`. + + + +### Step 1. Clone the repository + +```bash +git clone https://github.com/BerriAI/litellm.git +``` + +### Step 2. Deploy with Helm + +```bash +helm install \ + --set masterkey=SuPeRsEcReT \ + mydeploy \ + deploy/charts/litellm +``` + +### Step 3. Expose the service to localhost + +```bash +kubectl \ + port-forward \ + service/mydeploy-litellm \ + 8000:8000 +``` + +Your OpenAI proxy server is now running on `http://127.0.0.1:8000`. +