Skip to content

Commit a10b3c3

Browse files
committed
node: memory-mgr: Add logs when memory allocation is skipped due to QoS
Signed-off-by: Swati Sehgal <[email protected]>
1 parent 6240feb commit a10b3c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/kubelet/cm/memorymanager/policy_static.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ func (p *staticPolicy) Start(s state.State) error {
9696
// Allocate call is idempotent
9797
func (p *staticPolicy) Allocate(s state.State, pod *v1.Pod, container *v1.Container) (rerr error) {
9898
// allocate the memory only for guaranteed pods
99-
if v1qos.GetPodQOS(pod) != v1.PodQOSGuaranteed {
99+
qos := v1qos.GetPodQOS(pod)
100+
if qos != v1.PodQOSGuaranteed {
101+
klog.V(5).InfoS("Exclusive memory allocation skipped, pod QoS is not guaranteed", "pod", klog.KObj(pod), "containerName", container.Name, "qos", qos)
100102
return nil
101103
}
102104

0 commit comments

Comments
 (0)