Prevent ModelServing templates from overwriting controller Pod labels - #1593
Prevent ModelServing templates from overwriting controller Pod labels#1593miantalha45 wants to merge 5 commits into
Conversation
Signed-off-by: Talha Amjad <myown4500@gmail.com>
Signed-off-by: Talha Amjad <myown4500@gmail.com>
| // ModelServing controller when it creates Pods. | ||
| func IsControllerReservedPodLabel(key string) bool { | ||
| switch key { | ||
| case ModelServingNameLabelKey, |
There was a problem hiding this comment.
Should we reserve the entire modelserving.volcano.sh/ prefix instead of enumerating the current labels? Any future controller-managed label will remain user-overridable unless it is also added to this list.
|
The public |
Signed-off-by: Talha Amjad <myown4500@gmail.com>
|
Thanks for review @acsoto . I reserved the full I migrated the P/D role classification label from |
| if workloadv1alpha1.IsControllerReservedPodLabel(k) { | ||
| continue | ||
| } |
There was a problem hiding this comment.
Have you considered cluster upgrade scenarios? The code design might discard non-conflicting labels
There was a problem hiding this comment.
examples/kthena-router/ModelServing-ds1.5b-pd-disaggregation.yaml use modelserving.volcano.sh/rolename
Signed-off-by: Talha Amjad <myown4500@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Prevents
entryTemplateandworkerTemplatemetadata from overwriting labels owned by the ModelServing controller.The webhook now rejects template label keys under
modelserving.volcano.sh/. Pod generation also ignores this label namespace as a defensive fallback, keeping controller generated identity, routing, and rollout labels authoritative.Custom user labels remain supported.
Which issue(s) this PR fixes:
Fixes #1582
Bug evidence (required for bug-related PRs):
Before this change, a valid ModelServing template could set:
The controller first set
modelserving.volcano.sh/entry: "true"on the generated Entry Pod, then copied template labels into the same map. The template value overwrote the controller value.This caused the generated Entry Pod to have:
Headless Service selectors use the Entry label to find the Role Entry Pod, so the Service could have no endpoints.
Regression coverage verifies that:
Tests run:
Special notes for your reviewer:
The Pod generation guard protects controller labels if an existing resource, an older client, or an admission bypass supplies a reserved label. The webhook provides clear feedback for new or updated ModelServing resources.
Does this PR introduce a user-facing change?: