You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by "pbacsko (via GitHub)" <gi...@apache.org> on 2023/06/14 10:12:49 UTC

[GitHub] [yunikorn-k8shim] pbacsko commented on a diff in pull request #613: [YUNIKORN-1575] [shim] Ability to specify guaranteedResources via namespace annotations

pbacsko commented on code in PR #613:
URL: https://github.com/apache/yunikorn-k8shim/pull/613#discussion_r1229360090


##########
pkg/cache/context.go:
##########
@@ -706,6 +706,15 @@ func (ctx *Context) updateApplicationTags(request *interfaces.AddApplicationRequ
 			request.Metadata.Tags[siCommon.AppTagNamespaceResourceQuota] = string(quotaStr)
 		}
 	}
+
+	// add guaranteed resource info as an app tag
+	guaranteedResource := utils.GetNamespaceGuaranteedFromAnnotation(namespaceObj)
+	if guaranteedResource != nil && !common.IsZero(guaranteedResource) {
+		if guaranteedStr, err := json.Marshal(guaranteedResource); err == nil {

Review Comment:
   Nit: `guaranteedStr` is not a string, it's a byte array. Just call it `guaranteed`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org