craigcondit commented on code in PR #520:
URL: https://github.com/apache/yunikorn-k8shim/pull/520#discussion_r1103643797


##########
pkg/common/resource.go:
##########
@@ -79,6 +79,22 @@ func GetPodResource(pod *v1.Pod) (resource *si.Resource) {
                checkInitContainerRequest(pod, podResource)
        }
 
+       // K8s pod EnableOverHead from:
+       // alpha: v1.16
+       // beta: v1.18
+       // Enables PodOverhead, for accounting pod overheads which are specific 
to a given RuntimeClass
+
+       // If Overhead is being utilized, add to the total requests for the pod
+       if pod.Spec.Overhead != nil {
+               podOverHeadResource := getResource(pod.Spec.Overhead)
+               podResource = Add(podResource, podOverHeadResource)
+               // Logging the overall pod size and pod overhead
+               log.Logger().Debug("Pod overhead specified, overall pod size 
adjusted",

Review Comment:
   Can we use zap.Stringer(...) instead of zap.String(...) here? Then .String() 
won't be called unless debug logging is enabled. Also, everywhere else we log 
using simple strings for zap keys (i.e. "overallSize" vs. "Pod overall size", 
"overheadSize" vs. "Pod overhead size". This helps consistency and makes it 
easier for tooling to parse.



-- 
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]

Reply via email to