zhuqi-lucas commented on code in PR #613:
URL: https://github.com/apache/yunikorn-k8shim/pull/613#discussion_r1229374234
##########
pkg/common/utils/utils.go:
##########
@@ -142,6 +142,21 @@ func PodUnderCondition(pod *v1.Pod, condition
*v1.PodCondition) bool {
return current != nil && current.Status == condition.Status &&
current.Reason == condition.Reason
}
+// get namespace guaranteed resource from namespace annotation
+func GetNamespaceGuaranteedFromAnnotation(namespaceObj *v1.Namespace)
*si.Resource {
+ // retrieve guaranteed resource info from annotations
+ namespaceGuaranteed := GetNameSpaceAnnotationValue(namespaceObj,
constants.NamespaceGuaranteed)
+ var namespaceGuaranteedMap map[string]string
+ err := json.Unmarshal([]byte(namespaceGuaranteed),
&namespaceGuaranteedMap)
+ if err != nil {
+ log.Logger().Warn("Unable to process namespace.guaranteed
annotation",
+ zap.String("namespace", namespaceObj.Name),
+ zap.String("namespace.guaranteed val is",
namespaceGuaranteed))
Review Comment:
Addressed in latest PR, thanks @pbacsko .
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]