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
2 changes: 1 addition & 1 deletion charts/sglang/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ home: https://github.com/modelsphere/helm-charts
sources:
- https://github.com/modelsphere/helm-charts
type: application
version: 0.9.30
version: 0.9.31
appVersion: "1.0.0"

# CART is vendored under charts/cart -- already present, so no `helm dependency
Expand Down
8 changes: 8 additions & 0 deletions charts/sglang/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,11 @@
{{- $img := .Values.pd.router.imageOverride | default dict -}}
{{ $img.repository | default "lightseekorg/smg" }}:{{ $img.tag | default "1.14.0" }}
{{- end -}}

{{/*
The PD router's wait-upstreams init container image. Takes the root context.
*/}}
{{- define "sglang.pdWaitUpstreamsImage" -}}
{{- $img := .Values.pd.router.waitUpstreamsImage | default dict -}}
{{ $img.repository | default "debian" }}:{{ $img.tag | default "12-slim" }}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/sglang/templates/pd-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ spec:
loop just blocks until the full set shows up. */}}
initContainers:
- name: wait-upstreams
image: "{{ include "sglang.pdRouterImage" $root }}"
image: "{{ include "sglang.pdWaitUpstreamsImage" $root }}"
command: ["bash", "-lc"]
args:
- |
Expand Down
40 changes: 36 additions & 4 deletions charts/sglang/tests/pd_router_smg_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set:
pd.decode.gpus: 8
model.localPath: /models/x
tests:
- it: pd-ds router and its init container default to the pinned smg image
- it: pd-ds router defaults to the pinned smg image; its init container to debian
template: templates/pd-ds.yaml
documentSelector:
path: metadata.name
Expand All @@ -28,7 +28,7 @@ tests:
value: lightseekorg/smg:1.14.0
- equal:
path: spec.template.spec.initContainers[?(@.name == "wait-upstreams")].image
value: lightseekorg/smg:1.14.0
value: debian:12-slim

- it: pd-ds router execs smg and keeps its state dir where non-root can write
template: templates/pd-ds.yaml
Expand Down Expand Up @@ -59,7 +59,7 @@ tests:
path: spec.template.spec.containers[?(@.name == "router")].livenessProbe.exec.command[2]
pattern: 'file="/tmp/pd-router/\$3"'

- it: pd-ds override wins over the default
- it: pd-ds router override wins over the default and leaves the init container alone
template: templates/pd-ds.yaml
documentSelector:
path: metadata.name
Expand All @@ -71,6 +71,9 @@ tests:
- equal:
path: spec.template.spec.containers[?(@.name == "router")].image
value: registry.example.com/mirror/smg:1.14.1
- equal:
path: spec.template.spec.initContainers[?(@.name == "wait-upstreams")].image
value: debian:12-slim

- it: colocate router runs smg while its engines stay on the engine image
template: templates/pd-colocate.yaml
Expand Down Expand Up @@ -110,7 +113,7 @@ tests:
value: lightseekorg/smg:1.14.0
- equal:
path: spec.template.spec.initContainers[?(@.name == "wait-upstreams")].image
value: lightseekorg/smg:1.14.0
value: debian:12-slim

- it: colocate emptied override falls back to smg, not the engine image
template: templates/pd-colocate.yaml
Expand All @@ -125,3 +128,32 @@ tests:
- equal:
path: spec.template.spec.containers[?(@.name == "router")].image
value: lightseekorg/smg:1.14.0

- it: wait-upstreams image can be mirrored without touching the router
template: templates/pd-ds.yaml
documentSelector:
path: metadata.name
value: ci-router-s0
set:
pd.router.waitUpstreamsImage.repository: registry.example.com/mirror/debian
pd.router.waitUpstreamsImage.tag: 12-slim-pinned
asserts:
- equal:
path: spec.template.spec.initContainers[?(@.name == "wait-upstreams")].image
value: registry.example.com/mirror/debian:12-slim-pinned
- equal:
path: spec.template.spec.containers[?(@.name == "router")].image
value: lightseekorg/smg:1.14.0

- it: emptied wait-upstreams image falls back to debian
template: templates/pd-ds.yaml
documentSelector:
path: metadata.name
value: ci-router-s0
set:
pd.router.waitUpstreamsImage.repository: ""
pd.router.waitUpstreamsImage.tag: ""
asserts:
- equal:
path: spec.template.spec.initContainers[?(@.name == "wait-upstreams")].image
value: debian:12-slim
9 changes: 9 additions & 0 deletions charts/sglang/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@
"tag": { "type": "string" }
}
},
"waitUpstreamsImage": {
"description": "Image of the router's wait-upstreams init container. Needs bash, getent, awk, sort, wc and sleep. Independent of imageOverride.",
"type": "object",
"additionalProperties": false,
"properties": {
"repository": { "type": "string" },
"tag": { "type": "string" }
}
},
"affinityReplace": { "type": ["object", "null"] },
"tolerationsReplace": { "type": ["array", "null"] }
}
Expand Down
5 changes: 5 additions & 0 deletions charts/sglang/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ pd:
imageOverride:
repository: "lightseekorg/smg"
tag: "1.14.0"
# The wait-upstreams init container only resolves DNS, so it stays on a
# plain base image whatever the router runs. Set repository/tag to mirror it.
waitUpstreamsImage:
repository: "debian"
tag: "12-slim"
# The router always gets a copy of the model mounted read-only at
# model.mountPath (as /model for the tokenizer's HF lookup, the path
# cache_aware's prefix-hashing needs). Its default scheduling is
Expand Down
2 changes: 1 addition & 1 deletion charts/vllm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ home: https://github.com/modelsphere/helm-charts
sources:
- https://github.com/modelsphere/helm-charts
type: application
version: 0.9.2
version: 0.9.3
appVersion: "1.0.0"

# CART is vendored under charts/cart -- already present, so no `helm dependency
Expand Down
8 changes: 8 additions & 0 deletions charts/vllm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,11 @@
{{- $img := .Values.pd.router.imageOverride | default dict -}}
{{ $img.repository | default "vllm/vllm-router" }}:{{ $img.tag | default "v0.1.16.1" }}
{{- end -}}

{{/*
The PD router's wait-upstreams init container image. Takes the root context.
*/}}
{{- define "vllm.pdWaitUpstreamsImage" -}}
{{- $img := .Values.pd.router.waitUpstreamsImage | default dict -}}
{{ $img.repository | default "debian" }}:{{ $img.tag | default "12-slim" }}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/vllm/templates/pd-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ spec:
loop just blocks until the full set shows up. */}}
initContainers:
- name: wait-upstreams
image: "{{ include "vllm.pdRouterImage" $root }}"
image: "{{ include "vllm.pdWaitUpstreamsImage" $root }}"
command: ["bash", "-lc"]
args:
- |
Expand Down
40 changes: 36 additions & 4 deletions charts/vllm/tests/pd_router_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set:
pd.decode.gpus: 8
model.localPath: /models/x
tests:
- it: pd-ds router and its init container default to the pinned vllm-router image
- it: pd-ds router defaults to the pinned vllm-router image; its init container to debian
template: templates/pd-ds.yaml
documentSelector:
path: metadata.name
Expand All @@ -29,7 +29,7 @@ tests:
value: vllm/vllm-router:v0.1.16.1
- equal:
path: spec.template.spec.initContainers[?(@.name == "wait-upstreams")].image
value: vllm/vllm-router:v0.1.16.1
value: debian:12-slim

- it: pd-ds router execs vllm-router and keeps its state dir where non-root can write
template: templates/pd-ds.yaml
Expand Down Expand Up @@ -60,7 +60,7 @@ tests:
path: spec.template.spec.containers[?(@.name == "router")].livenessProbe.exec.command[2]
pattern: 'file="/tmp/pd-router/\$3"'

- it: pd-ds override wins over the default
- it: pd-ds router override wins over the default and leaves the init container alone
template: templates/pd-ds.yaml
documentSelector:
path: metadata.name
Expand All @@ -72,6 +72,9 @@ tests:
- equal:
path: spec.template.spec.containers[?(@.name == "router")].image
value: registry.example.com/mirror/vllm-router:v0.1.17
- equal:
path: spec.template.spec.initContainers[?(@.name == "wait-upstreams")].image
value: debian:12-slim

- it: colocate router runs vllm-router while its engines stay on the engine image
template: templates/pd-colocate.yaml
Expand Down Expand Up @@ -108,7 +111,7 @@ tests:
value: vllm/vllm-router:v0.1.16.1
- equal:
path: spec.template.spec.initContainers[?(@.name == "wait-upstreams")].image
value: vllm/vllm-router:v0.1.16.1
value: debian:12-slim

- it: colocate emptied override falls back to vllm-router, not the engine image
template: templates/pd-colocate.yaml
Expand All @@ -123,3 +126,32 @@ tests:
- equal:
path: spec.template.spec.containers[?(@.name == "router")].image
value: vllm/vllm-router:v0.1.16.1

- it: wait-upstreams image can be mirrored without touching the router
template: templates/pd-ds.yaml
documentSelector:
path: metadata.name
value: ci-router-s0
set:
pd.router.waitUpstreamsImage.repository: registry.example.com/mirror/debian
pd.router.waitUpstreamsImage.tag: 12-slim-pinned
asserts:
- equal:
path: spec.template.spec.initContainers[?(@.name == "wait-upstreams")].image
value: registry.example.com/mirror/debian:12-slim-pinned
- equal:
path: spec.template.spec.containers[?(@.name == "router")].image
value: vllm/vllm-router:v0.1.16.1

- it: emptied wait-upstreams image falls back to debian
template: templates/pd-ds.yaml
documentSelector:
path: metadata.name
value: ci-router-s0
set:
pd.router.waitUpstreamsImage.repository: ""
pd.router.waitUpstreamsImage.tag: ""
asserts:
- equal:
path: spec.template.spec.initContainers[?(@.name == "wait-upstreams")].image
value: debian:12-slim
9 changes: 9 additions & 0 deletions charts/vllm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@
"tag": { "type": "string" }
}
},
"waitUpstreamsImage": {
"description": "Image of the router's wait-upstreams init container. Needs bash, getent, awk, sort, wc and sleep. Independent of imageOverride.",
"type": "object",
"additionalProperties": false,
"properties": {
"repository": { "type": "string" },
"tag": { "type": "string" }
}
},
"affinityReplace": { "type": ["object", "null"] },
"tolerationsReplace": { "type": ["array", "null"] }
}
Expand Down
5 changes: 5 additions & 0 deletions charts/vllm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ pd:
imageOverride:
repository: "vllm/vllm-router"
tag: "v0.1.16.1"
# The wait-upstreams init container only resolves DNS, so it stays on a
# plain base image whatever the router runs. Set repository/tag to mirror it.
waitUpstreamsImage:
repository: "debian"
tag: "12-slim"
# The router always gets a copy of the model mounted read-only at
# model.mountPath (used by the tokenizer's HF lookup). Its default
# scheduling is pinned: required podAffinity to THIS slice's prefill
Expand Down
Loading