Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ The `deploy/components/` directory contains all reusable Kustomize components:
- `vllm-decode/` — Decode pod with routing sidecar

**Deployment overlays** — applied on top of the base components:
- `overlays/simulator/` — adds `--mode=${VLLM_SIM_MODE}`, vllm renderer sidecar, KV cache args, and `--zmq-endpoint` on Decode. Included by default in all dev scenario overlays.
- `overlays/simulator/` — adds `--mode=${VLLM_SIM_MODE}`, KV cache args, and `--zmq-endpoint` on Decode. Included by default in all dev scenario overlays.
- `overlays/real-vllm/` — adds `--kv-events-config` on Decode, `--ec-transfer-config` on Encode, and a shared PVC for encoder embeddings.

**Infrastructure components** — shared cluster infrastructure:
Expand Down Expand Up @@ -523,7 +523,7 @@ a shared PVC (`ec-cache-pvc`) for encoder embeddings transfer.

| Component | What it adds | When to use |
|---|---|---|
| `overlays/simulator/` | `--mode=${VLLM_SIM_MODE}`, vLLM renderer, KV cache args, `--zmq-endpoint` on Decode | Dev/test with simulator image |
| `overlays/simulator/` | `--mode=${VLLM_SIM_MODE}`, KV cache args, `--zmq-endpoint` on Decode | Dev/test with simulator image |
| `overlays/real-vllm/` | `--kv-events-config` on Decode (per-pod ZMQ publisher), `--ec-transfer-config` on Encode, ec-cache PVC | Production with real vLLM image |

| Variable | Default | Description |
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export VLLM_IMAGE ?= $(VLLM_SIMULATOR_TAG_BASE):$(VLLM_SIMULATOR_TAG)
# CPU-only vLLM image that exposes `vllm launch render` for the token-producer
# plugin's HTTP backend.
export VLLM_RENDER_IMAGE ?= vllm/vllm-openai-cpu:v0.21.0
export VLLM_RENDER_PORT ?= 8082
export VLLM_RENDER_URL ?= http://vllm-render:$(VLLM_RENDER_PORT)

BUILDER_TAG ?= dev
BUILDER_TAG_BASE ?= $(IMAGE_REGISTRY)/$(BUILDER_IMAGE_NAME)
Expand Down
31 changes: 0 additions & 31 deletions deploy/components/inference-gateway/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,40 +60,9 @@ spec:
mountPath: /etc/epp
- name: cache
mountPath: /cache
# vLLM render sidecar — exposes /v1/completions/render and
# /v1/chat/completions/render over loopback for the token-producer plugin.
- name: vllm-render
image: ${VLLM_RENDER_IMAGE}
imagePullPolicy: IfNotPresent
command: ["vllm", "launch", "render"]
args: ["${MODEL_NAME}", "--port=8000"]
ports:
- name: render-http
containerPort: 8000
startupProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 2
periodSeconds: 1
timeoutSeconds: 1
failureThreshold: 600
readinessProbe:
httpGet:
path: /health
port: 8000
periodSeconds: 5
timeoutSeconds: 1
failureThreshold: 1
volumeMounts:
- name: model-cache
mountPath: /root/.cache/huggingface
volumes:
- name: epp-config
configMap:
name: epp-config
- name: cache
emptyDir: {}
# HuggingFace cache for the render sidecar's model weights.
- name: model-cache
emptyDir: {}
96 changes: 0 additions & 96 deletions deploy/components/overlays/simulator/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,99 +40,3 @@ patches:
- op: add
path: /spec/template/spec/containers/0/args/4
value: "--zmq-endpoint=tcp://${EPP_NAME}.${NAMESPACE}.svc.cluster.local:5557"
- op: add
path: /spec/template/spec/initContainers/0
value:
name: vllm-render
image: ${VLLM_RENDER_IMAGE}
imagePullPolicy: IfNotPresent
restartPolicy: Always
command: ["vllm"]
args: ["launch", "render", "${MODEL_NAME}", "--port=8082"]
env:
- name: HF_TOKEN
value: "${HF_TOKEN}"
ports:
- name: http
containerPort: 8082
startupProbe:
httpGet:
path: /health
port: 8082
initialDelaySeconds: 2
periodSeconds: 1
failureThreshold: 600
timeoutSeconds: 1
livenessProbe:
httpGet:
path: /health
port: 8082
periodSeconds: 10
failureThreshold: 5
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /health
port: 8082
periodSeconds: 5
failureThreshold: 1
timeoutSeconds: 1
volumeMounts:
- name: model-cache
mountPath: /root/.cache/huggingface
- op: add
path: /spec/template/spec/volumes/-
value:
name: model-cache
emptyDir: {}
# --- Prefill and Encode deployments (vllm-p, vllm-e) ---
# initContainers: [] in base, so append with /-
- target:
kind: Deployment
name: "vllm-[pe]"
patch: |
- op: add
path: /spec/template/spec/initContainers/-
value:
name: vllm-render
image: ${VLLM_RENDER_IMAGE}
imagePullPolicy: IfNotPresent
restartPolicy: Always
command: ["vllm"]
args: ["launch", "render", "${MODEL_NAME}", "--port=8082"]
env:
- name: HF_TOKEN
value: "${HF_TOKEN}"
ports:
- name: http
containerPort: 8082
startupProbe:
httpGet:
path: /health
port: 8082
initialDelaySeconds: 2
periodSeconds: 1
failureThreshold: 600
timeoutSeconds: 1
livenessProbe:
httpGet:
path: /health
port: 8082
periodSeconds: 10
failureThreshold: 5
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /health
port: 8082
periodSeconds: 5
failureThreshold: 1
timeoutSeconds: 1
volumeMounts:
- name: model-cache
mountPath: /root/.cache/huggingface
- op: add
path: /spec/template/spec/volumes/-
value:
name: model-cache
emptyDir: {}
1 change: 1 addition & 0 deletions deploy/components/vllm-decode/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ spec:
- "--port=8200"
- "--model=${MODEL_NAME}"
- "--data-parallel-size=${VLLM_DATA_PARALLEL_SIZE}"
- "--render-url=${VLLM_RENDER_URL}"
- "${VLLM_EXTRA_ARGS_D}"
ports:
- name: http
Expand Down
1 change: 1 addition & 0 deletions deploy/components/vllm-encode/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
- "--data-parallel-size=${VLLM_DATA_PARALLEL_SIZE}"
- "--no-enable-prefix-caching"
- "--mm-encoder-only"
- "--render-url=${VLLM_RENDER_URL}"
- "${VLLM_EXTRA_ARGS_E}"
ports:
- name: encode-http
Expand Down
1 change: 1 addition & 0 deletions deploy/components/vllm-prefill/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ spec:
- "--model=${MODEL_NAME}"
- "--port=8000"
- "--data-parallel-size=${VLLM_DATA_PARALLEL_SIZE}"
- "--render-url=${VLLM_RENDER_URL}"
- "${VLLM_EXTRA_ARGS_P}"
ports:
- name: prefill-http
Expand Down
4 changes: 3 additions & 1 deletion deploy/environments/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ scenario-specific patches. The atomic components live in `deploy/components/`:
| `vllm-decode/` | Decode pod — always deployed, includes routing sidecar (removed in EPD scenario) |
| `vllm-prefill/` | Prefill pod — deployed when `DISAGG_P=true` |
| `vllm-encode/` | Encoder pod — deployed when `DISAGG_E=true` |
| `overlays/simulator/` | Adds `--mode=${VLLM_SIM_MODE}`, vLLM render, KV cache and ZMQ args (included by all scenario overlays) |
| `overlays/simulator/` | Adds `--mode=${VLLM_SIM_MODE}`, KV cache and ZMQ args (included by all scenario overlays) |

These overlays are used by both `scripts/kind-dev-env.sh` (for local KIND clusters)
and e2e tests (via `kustomize build` + env var substitution).
Expand Down Expand Up @@ -70,6 +70,8 @@ Variables substituted at deploy time via `envsubst` or Go test `substituteMany`:
| `VLLM_IMAGE` | vLLM container image (simulator or real) | `ghcr.io/llm-d/llm-d-inference-sim:v0.10.2` |
| `SIDECAR_IMAGE` | Routing sidecar image | `ghcr.io/llm-d/llm-d-router-disagg-sidecar:dev` |
| `VLLM_RENDER_IMAGE` | vLLM render sidecar image | `vllm/vllm-openai-cpu:v0.21.0` |
| `VLLM_RENDER_PORT` | Port the vllm-render Service listens on | `8082` |
| `VLLM_RENDER_URL` | URL of the vllm-render Service used by decode/encode/prefill pods | `http://vllm-render:${VLLM_RENDER_PORT}` |
| `MODEL_NAME` | Model name passed to vLLM. Can be a real HuggingFace model (e.g. `TinyLlama/TinyLlama-1.1B-Chat-v1.0`, `Qwen/Qwen3-VL-2B-Instruct`) or an arbitrary name when using the simulator (e.g. `food-review`) | `food-review` |
| `POOL_NAME` | InferencePool name | `food-review-inference-pool` |
| `VLLM_REPLICA_COUNT_E` | Encode deployment replicas | `1` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ kind: Kustomization
resources:
- destination-rules.yaml
- services.yaml
- vllm-render.yaml
- ../../../components/istio-control-plane/
- ../../../components/inference-gateway/

Expand Down
76 changes: 76 additions & 0 deletions deploy/environments/dev/base-kind-istio/vllm-render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: vllm-render
labels:
app: vllm-render
spec:
replicas: 1
selector:
matchLabels:
app: vllm-render
template:
metadata:
labels:
app: vllm-render
spec:
containers:
- name: vllm-render
image: ${VLLM_RENDER_IMAGE}
imagePullPolicy: IfNotPresent
command: ["vllm", "launch", "render"]
args: ["${MODEL_NAME}", "--port=${VLLM_RENDER_PORT}"]
# For gated models, inject HF_TOKEN via a Secret reference:
# env:
# - name: HF_TOKEN
# valueFrom:
# secretKeyRef:
# name: hf-token
# key: token
ports:
- name: render-http
containerPort: ${VLLM_RENDER_PORT}
startupProbe:
httpGet:
path: /health
port: ${VLLM_RENDER_PORT}
initialDelaySeconds: 2
periodSeconds: 1
failureThreshold: 600
timeoutSeconds: 1
livenessProbe:
httpGet:
path: /health
port: ${VLLM_RENDER_PORT}
periodSeconds: 10
failureThreshold: 5
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /health
port: ${VLLM_RENDER_PORT}
periodSeconds: 5
failureThreshold: 1
timeoutSeconds: 1
volumeMounts:
- name: model-cache
mountPath: /root/.cache/huggingface
volumes:
- name: model-cache
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: vllm-render
labels:
app: vllm-render
spec:
selector:
app: vllm-render
ports:
- name: http
protocol: TCP
port: ${VLLM_RENDER_PORT}
targetPort: ${VLLM_RENDER_PORT}
type: ClusterIP
66 changes: 66 additions & 0 deletions deploy/environments/dev/e2e-infra/vllm-render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: vllm-render
labels:
app: vllm-render
spec:
replicas: 1
selector:
matchLabels:
app: vllm-render
template:
metadata:
labels:
app: vllm-render
spec:
containers:
- name: vllm-render
image: ${VLLM_RENDER_IMAGE}
imagePullPolicy: IfNotPresent
args:
- "--model=${MODEL_NAME}"
- "--port=${VLLM_RENDER_PORT}"
- "--mode=echo"
- "--force-dummy-tokenizer"
ports:
- name: http
containerPort: ${VLLM_RENDER_PORT}
startupProbe:
httpGet:
path: /health
port: ${VLLM_RENDER_PORT}
initialDelaySeconds: 2
periodSeconds: 1
failureThreshold: 600
timeoutSeconds: 1
livenessProbe:
httpGet:
path: /health
port: ${VLLM_RENDER_PORT}
periodSeconds: 10
failureThreshold: 5
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /health
port: ${VLLM_RENDER_PORT}
periodSeconds: 5
failureThreshold: 1
timeoutSeconds: 1
Comment thread
elevran marked this conversation as resolved.
---
apiVersion: v1
kind: Service
metadata:
name: vllm-render
labels:
app: vllm-render
spec:
selector:
app: vllm-render
ports:
- name: http
protocol: TCP
port: ${VLLM_RENDER_PORT}
targetPort: ${VLLM_RENDER_PORT}
type: ClusterIP
1 change: 1 addition & 0 deletions deploy/environments/dev/epd/patch-decode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ spec:
- "--block-size=16"
- "--data-parallel-size=${VLLM_DATA_PARALLEL_SIZE}"
- "--zmq-endpoint=tcp://${EPP_NAME}.${NAMESPACE}.svc.cluster.local:5557"
- "--render-url=${VLLM_RENDER_URL}"
- "${VLLM_EXTRA_ARGS_D}"
ports:
- $patch: replace
Expand Down
6 changes: 4 additions & 2 deletions scripts/kind-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export SIDECAR_IMAGE
# Set a default VLLM_RENDER_IMAGE if not provided (CPU-only vLLM image that
# runs `vllm launch render` for the token-producer plugin's HTTP backend).
export VLLM_RENDER_IMAGE="${VLLM_RENDER_IMAGE:-vllm/vllm-openai-cpu:v0.21.0}"
export VLLM_RENDER_PORT="${VLLM_RENDER_PORT:-8082}"
export VLLM_RENDER_URL="${VLLM_RENDER_URL:-http://vllm-render:${VLLM_RENDER_PORT}}"

# Set the inference pool name for the deployment
export POOL_NAME="${POOL_NAME:-${MODEL_NAME_SAFE}-inference-pool}"
Expand Down Expand Up @@ -414,15 +416,15 @@ export ENABLE_LEADER_ELECTION=false
# Deploy Istio base (shared infrastructure)
kubectl kustomize --enable-helm deploy/environments/dev/base-kind-istio \
| envsubst '${POOL_NAME} ${MODEL_NAME} ${MODEL_NAME_SAFE} ${EPP_NAME} ${EPP_IMAGE} ${VLLM_IMAGE} \
${SIDECAR_IMAGE} ${VLLM_RENDER_IMAGE} ${TARGET_PORTS} ${NAMESPACE} ${METRICS_ENDPOINT_AUTH} \
${SIDECAR_IMAGE} ${VLLM_RENDER_IMAGE} ${VLLM_RENDER_PORT} ${VLLM_RENDER_URL} ${TARGET_PORTS} ${NAMESPACE} ${METRICS_ENDPOINT_AUTH} \
${EPP_REPLICA_COUNT} ${VLLM_REPLICA_COUNT_E} ${VLLM_REPLICA_COUNT_P} ${VLLM_REPLICA_COUNT_D} \
${VLLM_DATA_PARALLEL_SIZE} ${ENABLE_LEADER_ELECTION}' \
| kubectl --context ${KUBE_CONTEXT} apply -f -

# Deploy scenario-specific vLLM components
kubectl kustomize --enable-helm ${KUSTOMIZE_DIR} \
| envsubst '${POOL_NAME} ${MODEL_NAME} ${MODEL_NAME_SAFE} ${EPP_NAME} ${EPP_IMAGE} ${VLLM_IMAGE} \
${SIDECAR_IMAGE} ${VLLM_RENDER_IMAGE} ${TARGET_PORTS} ${NAMESPACE} \
${SIDECAR_IMAGE} ${VLLM_RENDER_IMAGE} ${VLLM_RENDER_PORT} ${VLLM_RENDER_URL} ${TARGET_PORTS} ${NAMESPACE} \
${VLLM_REPLICA_COUNT_E} ${VLLM_REPLICA_COUNT_P} ${VLLM_REPLICA_COUNT_D} ${VLLM_DATA_PARALLEL_SIZE} \
${KV_CONNECTOR_TYPE} ${EC_CONNECTOR_TYPE} ${CONNECTOR_TYPE} ${KV_CACHE_ENABLED} ${HF_TOKEN} ${VLLM_SIM_MODE} \
${DECODE_ROLE} ${VLLM_EXTRA_ARGS_E} ${VLLM_EXTRA_ARGS_P} ${VLLM_EXTRA_ARGS_D}' \
Expand Down
Loading
Loading