Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions apps/docs/content/self-host.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,15 @@ Once your LLMGateway is running:
2. **Create your first organization** and project
3. **Generate API keys** for your applications
4. **Test the gateway** by making API calls to http://localhost:4001

## Helm Chart

You can also deploy LLMGateway using the Helm chart.

```bash
helm repo add llmgateway https://llmgateway.io/helm
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yezz123 this link needs to be fixed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we should deploy it either in github pages or you can do it with the domain of llmgateway

helm repo update
helm install llmgateway llmgateway/llmgateway
```
Comment on lines +187 to +193
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add Helm-specific prerequisites to avoid failed onboarding.

Line [187] adds a Helm deployment path, but prerequisites are still Docker-only. Please add Kubernetes cluster + Helm requirements in the prerequisites section so this option is executable end-to-end.

📘 Proposed doc patch
 ## Prerequisites
 
 - Latest Docker
+- A Kubernetes cluster (local or managed)
+- Helm v3
 - API keys for the LLM providers you want to use (OpenAI, Anthropic, etc.)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/self-host.mdx` around lines 187 - 195, Update the
prerequisites section to include Kubernetes/Helm requirements so the new "Helm
Chart" instructions are executable: state that a Kubernetes cluster (minimum
version, e.g., v1.20+ or your supported minimum), kubectl configured to the
target cluster, Helm 3 installed, a default StorageClass or PVC capability,
access to a container registry (or imagePullSecrets) for the llmgateway image,
and any required RBAC/load‑balancer considerations; reference the "Helm Chart"
heading in the docs to ensure users see these prerequisites before the helm
repo/add/install commands.


See the [Helm chart documentation](https://llmgateway.io/helm) for more information.
11 changes: 11 additions & 0 deletions infra/helm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# LLM Gateway Helm Chart

This is the Helm chart for LLM Gateway. It is used to deploy LLM Gateway on a Kubernetes cluster.

## Installation

```bash
helm repo add llmgateway https://llmgateway.io/helm
helm repo update
helm install llmgateway llmgateway/llmgateway
```
20 changes: 20 additions & 0 deletions infra/helm/llmgateway/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v2
name: llmgateway
description: A Helm chart for LLM Gateway - a full-stack LLM API gateway with multi-provider support
type: application
icon: https://llmgateway.io/brand/logo-black.svg
version: 0.1.0
appVersion: "latest"
home: https://llmgateway.io
sources:
- https://github.com/theopenco/llmgateway
keywords:
- llm
- gateway
- ai
- openai
- anthropic
- api-gateway
maintainers:
- name: theopenco
url: https://github.com/theopenco
185 changes: 185 additions & 0 deletions infra/helm/llmgateway/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "llmgateway.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
*/}}
{{- define "llmgateway.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "llmgateway.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "llmgateway.labels" -}}
helm.sh/chart: {{ include "llmgateway.chart" . }}
{{ include "llmgateway.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.global.labels }}
{{ toYaml . }}
{{- end }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "llmgateway.selectorLabels" -}}
app.kubernetes.io/name: {{ include "llmgateway.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Component labels (call with dict "context" . "component" "api")
*/}}
{{- define "llmgateway.componentLabels" -}}
{{ include "llmgateway.labels" .context }}
app.kubernetes.io/component: {{ .component }}
{{- end }}

{{/*
Component selector labels
*/}}
{{- define "llmgateway.componentSelectorLabels" -}}
{{ include "llmgateway.selectorLabels" .context }}
app.kubernetes.io/component: {{ .component }}
{{- end }}

{{/*
Build image reference for a component.
Usage: {{ include "llmgateway.image" (dict "context" . "image" .Values.api.image) }}
*/}}
{{- define "llmgateway.image" -}}
{{- $registry := .image.registry | default .context.Values.global.image.registry -}}
{{- $repository := .image.repository -}}
{{- $tag := .image.tag | default .context.Values.global.image.tag | default .context.Chart.AppVersion -}}
{{- if $registry -}}
{{- printf "%s/%s:%s" $registry $repository $tag -}}
{{- else -}}
{{- printf "%s:%s" $repository $tag -}}
{{- end -}}
{{- end }}

{{/*
Image pull secrets
*/}}
{{- define "llmgateway.imagePullSecrets" -}}
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}

{{/*
Secret name (supports existingSecret)
*/}}
{{- define "llmgateway.secretName" -}}
{{- if .Values.existingSecret }}
{{- .Values.existingSecret }}
{{- else }}
{{- include "llmgateway.fullname" . }}
{{- end }}
{{- end }}

{{/*
ConfigMap name
*/}}
{{- define "llmgateway.configMapName" -}}
{{- include "llmgateway.fullname" . }}-config
{{- end }}

{{/*
PostgreSQL host
*/}}
{{- define "llmgateway.postgresql.host" -}}
{{- if .Values.postgresql.enabled }}
{{- printf "%s-postgresql" (include "llmgateway.fullname" .) }}
{{- else }}
{{- .Values.externalPostgresql.host }}
{{- end }}
{{- end }}

{{/*
PostgreSQL port
*/}}
{{- define "llmgateway.postgresql.port" -}}
{{- if .Values.postgresql.enabled }}
{{- .Values.postgresql.port | default 5432 }}
{{- else }}
{{- .Values.externalPostgresql.port | default 5432 }}
{{- end }}
{{- end }}

{{/*
PostgreSQL database
*/}}
{{- define "llmgateway.postgresql.database" -}}
{{- if .Values.postgresql.enabled }}
{{- .Values.postgresql.database | default "llmgateway" }}
{{- else }}
{{- .Values.externalPostgresql.database | default "llmgateway" }}
{{- end }}
{{- end }}

{{/*
PostgreSQL user
*/}}
{{- define "llmgateway.postgresql.user" -}}
{{- if .Values.postgresql.enabled }}
{{- .Values.postgresql.user | default "postgres" }}
{{- else }}
{{- .Values.externalPostgresql.user | default "postgres" }}
{{- end }}
{{- end }}

{{/*
Redis host
*/}}
{{- define "llmgateway.redis.host" -}}
{{- if .Values.redis.enabled }}
{{- printf "%s-redis" (include "llmgateway.fullname" .) }}
{{- else }}
{{- .Values.externalRedis.host }}
{{- end }}
{{- end }}

{{/*
Redis port
*/}}
{{- define "llmgateway.redis.port" -}}
{{- if .Values.redis.enabled }}
{{- .Values.redis.port | default 6379 }}
{{- else }}
{{- .Values.externalRedis.port | default 6379 }}
{{- end }}
{{- end }}

{{/*
Internal service URL helper.
Usage: {{ include "llmgateway.serviceUrl" (dict "context" . "name" "api") }}
*/}}
{{- define "llmgateway.serviceUrl" -}}
{{- printf "http://%s-%s:80" (include "llmgateway.fullname" .context) .name -}}
{{- end }}
63 changes: 63 additions & 0 deletions infra/helm/llmgateway/templates/admin-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{{- if .Values.admin.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "llmgateway.fullname" . }}-admin
labels:
{{- include "llmgateway.componentLabels" (dict "context" . "component" "admin") | nindent 4 }}
spec:
replicas: {{ .Values.admin.replicas | default 1 }}
selector:
matchLabels:
{{- include "llmgateway.componentSelectorLabels" (dict "context" . "component" "admin") | nindent 6 }}
template:
metadata:
labels:
{{- include "llmgateway.componentSelectorLabels" (dict "context" . "component" "admin") | nindent 8 }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
spec:
{{- include "llmgateway.imagePullSecrets" . | nindent 6 }}
containers:
- name: admin
image: {{ include "llmgateway.image" (dict "context" . "image" .Values.admin.image) }}
imagePullPolicy: {{ .Values.admin.image.pullPolicy | default "IfNotPresent" }}
ports:
- name: http
containerPort: 80
protocol: TCP
envFrom:
- configMapRef:
name: {{ include "llmgateway.configMapName" . }}
- secretRef:
name: {{ include "llmgateway.secretName" . }}
{{- with .Values.admin.extraEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
readinessProbe:
httpGet:
path: /api/health
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
livenessProbe:
httpGet:
path: /api/health
port: http
initialDelaySeconds: 20
periodSeconds: 30
timeoutSeconds: 5
resources:
{{- toYaml .Values.admin.resources | nindent 12 }}
{{- with .Values.admin.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.admin.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
17 changes: 17 additions & 0 deletions infra/helm/llmgateway/templates/admin-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.admin.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "llmgateway.fullname" . }}-admin
labels:
{{- include "llmgateway.componentLabels" (dict "context" . "component" "admin") | nindent 4 }}
spec:
type: {{ .Values.admin.service.type | default "ClusterIP" }}
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
{{- include "llmgateway.componentSelectorLabels" (dict "context" . "component" "admin") | nindent 4 }}
{{- end }}
Loading
Loading