mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
node: memory-mgr: Add logs when memory allocation is skipped due to QoS
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
This commit is contained in:
parent
6240febf4c
commit
a10b3c3555
@ -96,7 +96,9 @@ func (p *staticPolicy) Start(s state.State) error {
|
|||||||
// Allocate call is idempotent
|
// Allocate call is idempotent
|
||||||
func (p *staticPolicy) Allocate(s state.State, pod *v1.Pod, container *v1.Container) (rerr error) {
|
func (p *staticPolicy) Allocate(s state.State, pod *v1.Pod, container *v1.Container) (rerr error) {
|
||||||
// allocate the memory only for guaranteed pods
|
// allocate the memory only for guaranteed pods
|
||||||
if v1qos.GetPodQOS(pod) != v1.PodQOSGuaranteed {
|
qos := v1qos.GetPodQOS(pod)
|
||||||
|
if qos != v1.PodQOSGuaranteed {
|
||||||
|
klog.V(5).InfoS("Exclusive memory allocation skipped, pod QoS is not guaranteed", "pod", klog.KObj(pod), "containerName", container.Name, "qos", qos)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user