Skip to content

[Feat] Add per-model custom labels and podLabels to modelSpec#949

Merged
ruizhang0101 merged 7 commits into
vllm-project:mainfrom
NasAmin:feat/modelspec-custom-labels
Jun 18, 2026
Merged

[Feat] Add per-model custom labels and podLabels to modelSpec#949
ruizhang0101 merged 7 commits into
vllm-project:mainfrom
NasAmin:feat/modelspec-custom-labels

Conversation

@NasAmin

@NasAmin NasAmin commented May 11, 2026

Copy link
Copy Markdown
Contributor

Add support for custom labels and podLabels on a per-model basis via modelSpec, similar to the existing annotations and podAnnotations fields.

labels are applied to the Deployment resource metadata, and podLabels are applied to the pod template metadata. Neither is added to selector.matchLabels since selectors are immutable after creation.

Use case: Enables teams to apply custom labels per model for GPU scheduling (e.g., nodeAffinity rules driven by labels) and observability via pod metadata collection.

Changes:

  • helm/values.yaml — Added labels and podLabels fields to modelSpec
  • helm/values.schema.json — Added schema definitions for both fields
  • helm/templates/deployment-vllm-multi.yaml — Render per-model labels on deployment and pod template metadata
  • helm/tests/deployment-vllm-multi_test.yaml — Added test verifying labels, podLabels, and selector isolation

FIX #934

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the ability to define per-model custom labels and pod labels in the multi-model vLLM deployment template. The changes include updates to the Helm chart templates, values schema, and default values, along with a new test case to verify that these labels are rendered correctly and do not leak into the selector match labels. The reviewer suggests reordering the label blocks in the templates to ensure that model-specific labels take precedence over standard labels by placing them after the helper includes.

Comment thread helm/templates/deployment-vllm-multi.yaml Outdated
Comment thread helm/templates/deployment-vllm-multi.yaml Outdated
@NasAmin NasAmin force-pushed the feat/modelspec-custom-labels branch 2 times, most recently from 4d53164 to b4d7ac1 Compare May 11, 2026 14:39
@NasAmin NasAmin marked this pull request as ready for review May 11, 2026 14:41

@ruizhang0101 ruizhang0101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you add this to readme as well? Otherwise LGTM.

@NasAmin NasAmin force-pushed the feat/modelspec-custom-labels branch from b4d7ac1 to f0c1bce Compare May 13, 2026 20:24
@NasAmin

NasAmin commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

Could you add this to readme as well? Otherwise LGTM.

Thanks, readme updated

NasAmin added 2 commits May 13, 2026 21:30
Signed-off-by: Nasir Amin <nasir.amin@outlook.com>
Signed-off-by: Nasir Amin <nasir.amin@outlook.com>
@NasAmin NasAmin force-pushed the feat/modelspec-custom-labels branch from 61adf38 to 859670d Compare May 13, 2026 20:30
@ruizhang0101

Copy link
Copy Markdown
Collaborator

@NasAmin Could you fix the pre-commit when you have time?

ruizhang0101 and others added 3 commits May 26, 2026 12:47
Regenerate helm/values.schema.json so the labels property is placed in
alphabetical order, matching the schema generator output. The committed
schema had labels hand-placed after annotations, causing the CI
'Check if values schema is up-to-date' step to fail with a diff.

Signed-off-by: Nasir Amin <nasir.amin@outlook.com>
@NasAmin

NasAmin commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@NasAmin Could you fix the pre-commit when you have time?

@ruizhang0101 Sorry for the late reply. I have pushed a change but not sure if is successful as CI is blocked.

@ruizhang0101 ruizhang0101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ruizhang0101 ruizhang0101 enabled auto-merge (squash) June 18, 2026 19:18
@ruizhang0101 ruizhang0101 merged commit c92350d into vllm-project:main Jun 18, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: Additional labels per model deployment via modelSpec

2 participants