Skip to content
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

Support passing labels and annotations in ServingRuntime to runtime Pod #224

Closed
lizzzcai opened this issue Sep 1, 2022 · 2 comments · Fixed by #271
Closed

Support passing labels and annotations in ServingRuntime to runtime Pod #224

lizzzcai opened this issue Sep 1, 2022 · 2 comments · Fixed by #271
Assignees

Comments

@lizzzcai
Copy link
Member

lizzzcai commented Sep 1, 2022

Is your feature request related to a problem? If so, please describe.

We have a custom webhook to validate and mutate the actual pod created by the ServingRuntime based on the labels/annotations, for example, mutate resources limit and validate user info added in the annotations.

However, currently the ServingRuntime will not pass its own labels/annotations to the deployment/pod and there is no field in the spec to provide labels/annotations as well. The runtimePodLabels and runtimePodAnnotations in model-serving-config are system-wide configurations but our use case is setting the value per ServingRuntime.

Describe your proposed solution

  1. pass labels/annotations in the ServingRuntime's metadata to the deployment spec.template.metadata, or
  2. add labels and annotations fields in the ServingRuntime spec and pass them to the deployment spec.template.metadata.

Describe alternatives you have considered

Additional context

@njhill
Copy link
Member

njhill commented Sep 26, 2022

@lizzzcai this sounds very reasonable and would be pretty trivial to implement. We should definitely follow the second proposal though, specifically to add annotations and labels fields to the ServingRuntimePodSpec.

This would apply similarly to single-model runtimes so would also require a small update to the original kserve controller.

PRs are very welcome!

@lizzzcai
Copy link
Member Author

Hi @njhill , I have created one PR in kserve controller, feel free to review it when you have time.

@yuzisun yuzisun moved this to Done in KServe 0.10 Oct 21, 2022
njhill pushed a commit that referenced this issue Nov 3, 2022
…ec to runtime Pod (#271)

Motivation

fix #224

Modifications

1. Update servingruntime CRDs
2. pass labels and annotations from ServingRuntimePodSpec to deployment.Spec.Template and add tests
3. upgrade dependencies

Result

The feature is functionally working, I have tested it manually.
The user is able to pass labels and annotations from servingruntime. It will overwrite labels and annotations from the config.

Signed-off-by: Lize Cai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
2 participants