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: 2 additions & 0 deletions helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ This table documents all available configuration values for the Production Stack
|-------|------|---------|-------------|
| `servingEngineSpec.modelSpec[].annotations` | map | `{}` | (Optional) Annotations to add to the deployment, e.g., {model: "opt125m"} |
| `servingEngineSpec.modelSpec[].podAnnotations` | map | `{}` | (Optional) Annotations to add to the pod, e.g., {model: "opt125m"} |
| `servingEngineSpec.modelSpec[].labels` | map | `{}` | (Optional) Additional labels to add to the deployment |
| `servingEngineSpec.modelSpec[].podLabels` | map | `{}` | (Optional) Additional labels to add to the pods |
| `servingEngineSpec.modelSpec[].name` | string | `""` | The name of the model, e.g., "example-model" |
| `servingEngineSpec.modelSpec[].repository` | string | `""` | The repository of the model, e.g., "vllm/vllm-openai" |
| `servingEngineSpec.modelSpec[].tag` | string | `""` | The tag of the model, e.g., "latest" |
Expand Down
6 changes: 6 additions & 0 deletions helm/templates/deployment-vllm-multi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ metadata:
helm-release-name: {{ .Release.Name }}
{{- include "chart.engineStandardLabels" (dict "releaseName" .Release.Name "modelName" $modelSpec.name "chartName" .Chart.Name) | nindent 4 }}
{{- include "chart.engineLabels" . | nindent 4 }}
{{- with $modelSpec.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if not (and $modelSpec.keda $modelSpec.keda.enabled) }}
replicas: {{ $modelSpec.replicaCount }}
Expand All @@ -49,6 +52,9 @@ spec:
helm-release-name: {{ .Release.Name }}
{{- include "chart.engineStandardLabels" (dict "releaseName" .Release.Name "modelName" $modelSpec.name "chartName" .Chart.Name) | nindent 8 }}
{{- include "chart.engineLabels" . | nindent 8 }}
{{- with $modelSpec.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if $modelSpec.priorityClassName }}
priorityClassName: {{ $modelSpec.priorityClassName | quote }}
Expand Down
47 changes: 47 additions & 0 deletions helm/tests/deployment-vllm-multi_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,53 @@ tests:
fieldRef:
fieldPath: status.podIP

- it: should render per-model custom labels and podLabels
release:
name: vllm
set:
servingEngineSpec:
enableEngine: true
modelSpec:
- name: "test-model"
labels:
gpu-size: large
team: ml-platform
podLabels:
cost-center: ml-infra
gpu-type: a100
repository: "vllm/vllm-openai"
tag: "latest"
modelURL: "facebook/opt-125m"
replicaCount: 1
requestCPU: 1
requestMemory: "1Gi"
requestGPU: 1
asserts:
- hasDocuments:
count: 1
- documentIndex: 0
isSubset:
path: metadata.labels
content:
gpu-size: large
team: ml-platform
- documentIndex: 0
isSubset:
path: spec.template.metadata.labels
content:
cost-center: ml-infra
gpu-type: a100
- documentIndex: 0
isNotSubset:
path: spec.selector.matchLabels
content:
gpu-size: large
- documentIndex: 0
isNotSubset:
path: spec.selector.matchLabels
content:
cost-center: ml-infra

- it: should render two models, one with chat templates
release:
name: vllm
Expand Down
8 changes: 8 additions & 0 deletions helm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,10 @@
}
}
},
"labels": {
"description": "Additional labels to add to the deployment",
"type": "object"
},
"limitCPU": {
"description": "The CPU limit for the model. If limitCPU and limitMemory are not specified, only GPU resources will have limits set equal to their requests.",
"type": [
Expand Down Expand Up @@ -1388,6 +1392,10 @@
"description": "The annotations to add to the pods",
"type": "object"
},
"podLabels": {
"description": "Additional labels to add to the pods",
"type": "object"
},
"priorityClassName": {
"description": "The name of the priority class name for the deployment",
"type": "string"
Expand Down
4 changes: 4 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ servingEngineSpec:
annotations: {}
# -- The annotations to add to the pods
podAnnotations: {}
# -- Additional labels to add to the deployment
labels: {}
# -- Additional labels to add to the pods
podLabels: {}
# -- The name of the service account to use for the deployment
serviceAccountName: ""
# -- The name of the priority class name for the deployment
Expand Down
Loading