Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
79adf2c
docs: add Helm chart design document
slin1237 Mar 10, 2026
103fc0f
docs: add Helm chart implementation plan
slin1237 Mar 10, 2026
a086184
feat(helm): scaffold chart with Chart.yaml and helmignore
slin1237 Mar 10, 2026
5e33b83
feat(helm): add values.yaml with all configuration sections
slin1237 Mar 10, 2026
7278ab6
feat(helm): add template helpers with router args builder
slin1237 Mar 10, 2026
b568bae
feat(helm): add router deployment, service, serviceaccount, and secre…
slin1237 Mar 10, 2026
edf5c6e
fix(helm): fix template rendering issues
slin1237 Mar 10, 2026
92fb28f
feat(helm): add RBAC templates for service discovery
slin1237 Mar 10, 2026
54c56fb
feat(helm): add ingress, HPA, PDB, ServiceMonitor, and Grafana dashbo…
slin1237 Mar 10, 2026
e159ea3
feat(helm): add worker deployment and service templates
slin1237 Mar 10, 2026
9be53d8
feat(helm): add PD disaggregation prefill and decode templates
slin1237 Mar 10, 2026
5b0e73e
feat(helm): add helm test for router health check
slin1237 Mar 10, 2026
5e4f56d
feat(helm): add JSON Schema validation for values
slin1237 Mar 10, 2026
371b655
docs(helm): add example values for all deployment scenarios
slin1237 Mar 10, 2026
b3e0410
docs(helm): add comprehensive README with quickstart and examples
slin1237 Mar 10, 2026
9dfecd8
refactor(helm): simplify chart to router-only mode
slin1237 Mar 10, 2026
64e5c0d
fix(helm): address PR review feedback for CLI flags and env vars
slin1237 Mar 10, 2026
c65c895
fix(helm): address CodeRabbit review feedback
slin1237 Mar 10, 2026
42c0991
fix(helm): fix CLI flags for Python entrypoint, address remaining rev…
slin1237 Mar 10, 2026
aed0e84
fix(helm): add --enable-trace flag and fix history.backend=none handling
slin1237 Mar 10, 2026
2c0c56b
fix(helm): fix CLI flag mismatches, add securityContext and configura…
slin1237 Mar 10, 2026
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
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents, --unsafe]
exclude: ^deploy/helm/.*/templates/|^deploy/helm/.*/tests/
- id: check-toml
- id: check-added-large-files
- id: check-merge-conflict
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/smg/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
.gitignore
examples/
Comment thread
slin1237 marked this conversation as resolved.
Resolved
29 changes: 29 additions & 0 deletions deploy/helm/smg/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: v2
name: smg
description: "Shepherd Model Gateway - high-performance inference router for LLM deployments"
type: application
version: 0.1.0
appVersion: "0.7.0"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
kubeVersion: ">=1.26.0-0"
home: https://github.com/lightseekorg/smg
sources:
- https://github.com/lightseekorg/smg
maintainers:
- name: LightSeek
url: https://github.com/lightseekorg
keywords:
- llm
- inference
- gateway
- router
- sglang
- vllm
# dependencies:
# - name: postgresql
# version: "~16"
# repository: https://charts.bitnami.com/bitnami
# condition: history.postgres.deploy
# - name: redis
# version: "~20"
# repository: https://charts.bitnami.com/bitnami
# condition: history.redis.deploy
68 changes: 68 additions & 0 deletions deploy/helm/smg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# SMG Helm Chart

Helm chart for deploying the Shepherd Model Gateway (SMG) — a high-performance inference router for LLM deployments.

## Prerequisites

- Kubernetes >= 1.26
- Helm >= 3.12

## Quick Start

```bash
helm install smg deploy/helm/smg \
--set router.workerUrls[0]=http://worker-1:8000 \
--set router.workerUrls[1]=http://worker-2:8000
```

## Configuration

See [`values.yaml`](values.yaml) for the full list of configurable parameters.

### Key Sections

| Section | Description |
|---------|-------------|
| `global` | Image registry, pull secrets |
| `router` | Router deployment, routing policy, networking, observability |
| `auth` | API key authentication, rate limiting |
| `history` | Storage backend (none/memory/postgres/redis/oracle) |
| `serviceAccount` | Service account creation and annotations |
| `rbac` | RBAC for Kubernetes service discovery |

### Routing Policies

`cache_aware` (default), `round_robin`, `power_of_two`, `consistent_hashing`, `prefix_hash`, `manual`, `random`, `bucket`

## Examples

| File | Scenario |
|------|----------|
| [`router-only.yaml`](examples/router-only.yaml) | Minimal router with external workers |
| [`with-postgres.yaml`](examples/with-postgres.yaml) | PostgreSQL history backend |
| [`with-service-discovery.yaml`](examples/with-service-discovery.yaml) | K8s auto-discovery |
| [`with-ingress.yaml`](examples/with-ingress.yaml) | Ingress with TLS |
| [`with-monitoring.yaml`](examples/with-monitoring.yaml) | ServiceMonitor + Grafana dashboard |

## Testing

```bash
helm test smg
```

## Upgrading

### 0.1.0

Initial release.

## Troubleshooting

### Service discovery not finding pods

Verify RBAC is enabled and the selector matches your worker pod labels:

```bash
kubectl get role,rolebinding -l app.kubernetes.io/instance=smg
kubectl get pods -l <your-selector>
```
7 changes: 7 additions & 0 deletions deploy/helm/smg/examples/router-only.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Minimal router-only deployment pointing at existing workers.
# Usage: helm install smg deploy/helm/smg -f deploy/helm/smg/examples/router-only.yaml
router:
workerUrls:
- http://worker-1.default.svc:8000
- http://worker-2.default.svc:8000
policy: cache_aware
20 changes: 20 additions & 0 deletions deploy/helm/smg/examples/with-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Router with Ingress and TLS.
# Usage: helm install smg deploy/helm/smg -f deploy/helm/smg/examples/with-ingress.yaml
router:
workerUrls:
- http://worker-1:8000
ingress:
enabled: true
className: nginx
annotations:
nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"
nginx.ingress.kubernetes.io/proxy-send-timeout: "1800"
hosts:
- host: smg.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: smg-tls
hosts:
- smg.example.com
16 changes: 16 additions & 0 deletions deploy/helm/smg/examples/with-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Router with Prometheus ServiceMonitor and Grafana dashboard.
# Usage: helm install smg deploy/helm/smg -f deploy/helm/smg/examples/with-monitoring.yaml
router:
workerUrls:
- http://worker-1:8000
metrics:
serviceMonitor:
enabled: true
interval: 15s
labels:
release: prometheus
grafana:
dashboard:
enabled: true
labels:
grafana_dashboard: "1"
10 changes: 10 additions & 0 deletions deploy/helm/smg/examples/with-postgres.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Router with PostgreSQL history backend.
# Usage: helm install smg deploy/helm/smg -f deploy/helm/smg/examples/with-postgres.yaml
router:
workerUrls:
- http://worker-1:8000
history:
backend: postgres
postgres:
url: "postgresql://smg:<YOUR_PASSWORD>@postgres:5432/smg" # replace with real credentials
poolMax: 10
8 changes: 8 additions & 0 deletions deploy/helm/smg/examples/with-service-discovery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Router with Kubernetes service discovery (auto-discover worker pods).
# Usage: helm install smg deploy/helm/smg -f deploy/helm/smg/examples/with-service-discovery.yaml
router:
policy: cache_aware
serviceDiscovery:
enabled: true
selector: "app=sglang-worker"
port: 8000
17 changes: 17 additions & 0 deletions deploy/helm/smg/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- $fullname := include "smg.fullname" . -}}

Router:
Endpoint: http://{{ $fullname }}-router:{{ .Values.router.service.port }}
Metrics: http://{{ $fullname }}-router:{{ .Values.router.metrics.port }}/metrics
Policy: {{ .Values.router.policy }}

{{- if .Values.router.ingress.enabled }}

Ingress:
{{- range .Values.router.ingress.hosts }}
http{{ if $.Values.router.ingress.tls }}s{{ end }}://{{ .host }}
{{- end }}
{{- end }}

To test the deployment:
helm test {{ .Release.Name }}
Loading