Skip to content

[Feat] Added option to specify priority class #557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2025
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
3 changes: 3 additions & 0 deletions helm/templates/deployment-cache-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ spec:
labels:
{{- include "chart.cacheserverLabels" . | nindent 8 }}
spec:
{{- if .Values.cacheserverSpec.priorityClassName}}
priorityClassName: {{ .Values.cacheserverSpec.priorityClassName | quote }}
{{- end }}
{{- if .Values.cacheserverSpec.nodeSelectorTerms}}
affinity:
nodeAffinity:
Expand Down
3 changes: 3 additions & 0 deletions helm/templates/deployment-router.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
{{- include "chart.routerLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ .Release.Name }}-router-service-account
{{- if .Values.routerSpec.priorityClassName }}
priorityClassName: {{ .Values.routerSpec.priorityClassName | quote }}
{{- end }}
{{- if .Values.routerSpec.nodeSelectorTerms }}
affinity:
nodeAffinity:
Expand Down
3 changes: 3 additions & 0 deletions helm/templates/deployment-vllm-multi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ spec:
helm-release-name: {{ .Release.Name }}
{{- include "chart.engineLabels" . | nindent 8 }}
spec:
{{- if $modelSpec.priorityClassName }}
priorityClassName: {{ $modelSpec.priorityClassName | quote }}
{{- end }}
Comment on lines +46 to +48

Choose a reason for hiding this comment

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

medium

Consider adding a check to ensure $modelSpec.priorityClassName is not empty before quoting it. This prevents adding an empty priorityClassName field to the deployment if the value is not provided.[^1]

{{- if and $modelSpec.priorityClassName (not (empty $modelSpec.priorityClassName)) }}
      priorityClassName: {{ $modelSpec.priorityClassName | quote }}
      {{- end }}

{{- if hasKey $modelSpec "initContainer" }}
{{- $container := $modelSpec.initContainer }}
initContainers:
Expand Down
3 changes: 3 additions & 0 deletions helm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
"requestGPUType": {
"type": "string"
},
"priorityClassName": {
"type": "string"
},
"pvcStorage": {
"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 @@ -18,6 +18,7 @@ servingEngineSpec:
# Each entry in the modelSpec array should contain the following fields:
# - annotations: (Optional, map) The annotations to add to the deployment, e.g., {model: "opt125m"}
# - serviceAccountName: (Optional, string) The name of the service account to use for the deployment, e.g., "vllm-service-account"
# - priorityClassName: (Optional, string) The name of the priority class name for the deployment, e.g., "high-priority"
# - podAnnotations: (Optional, map) The annotations to add to the pod, e.g., {model: "opt125m"}
# - name: (string) The name of the model, e.g., "example-model"
# - repository: (string) The repository of the model, e.g., "vllm/vllm-openai"
Expand Down Expand Up @@ -267,6 +268,9 @@ routerSpec:
# -- Number of replicas
replicaCount: 1

# -- Priority Class
priorityClassName: ""

# -- Container port
containerPort: 8000

Expand Down