Skip to content

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

Open
NasAmin wants to merge 3 commits into
vllm-project:mainfrom
NasAmin:feat/modelspec-custom-labels
Open

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

Conversation

@NasAmin
Copy link
Copy Markdown

@NasAmin NasAmin commented May 11, 2026

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

Copy link
Copy Markdown
Contributor

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

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
Copy link
Copy Markdown
Collaborator

@ruizhang0101 ruizhang0101 left a comment

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
Copy link
Copy Markdown
Author

NasAmin commented May 13, 2026

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?

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