-
Notifications
You must be signed in to change notification settings - Fork 136
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
[YUNIKORN-1697] [shim] Make namespace annotation to support max appli… #885
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #885 +/- ##
==========================================
+ Coverage 68.09% 68.16% +0.07%
==========================================
Files 70 70
Lines 7625 7642 +17
==========================================
+ Hits 5192 5209 +17
Misses 2216 2216
Partials 217 217 ☔ View full report in Codecov by Sentry. |
// add maxApps resource info as an app tag | ||
maxApps := utils.GetNamespaceMaxAppsFromAnnotation(namespaceObj) | ||
if maxApps != "" { | ||
request.Metadata.Tags[siCommon.AppTagNamespaceResourceMaxApps] = maxApps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment of this function should include "namespace.resourcemaxapps". Besides, the "namespace.resourceguaranteed" looks like missing in the previous change.
// update application tags in the AddApplicationRequest based on the namespace annotation
// adds the following tags to the request based on annotations (if exist):
// - namespace.resourcequota
// - namespace.parentqueue
// - namespace.resourceguaranteed
// - namespace.resourcemaxapps
func (ctx *Context) updateApplicationTags(request *AddApplicationRequest, namespace string) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this, addressed in latest PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! A minor nit.
Name: "test", | ||
Namespace: "test", | ||
Annotations: map[string]string{ | ||
constants.NamespaceMaxApps: "5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a negative test case as well? eg. -5
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, addressed in latest PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…cations update.
What is this PR for?
We want to add ability to specify max apps via namespace annotations, this is the shim side change.
The si change has been merged apache/yunikorn-scheduler-interface#117
What type of PR is it?
Todos
What is the Jira issue?
[YUNIKORN-2] Gang scheduling interface parameters
How should this be tested?
Screenshots (if appropriate)
Questions: