Commit 960b9e95 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #13867 from JanetKuo/qos-policy-bug

Auto commit by PR queue bot
parents 214f740f 452ebed9
...@@ -37,9 +37,9 @@ func isMemoryBestEffort(container *api.Container) bool { ...@@ -37,9 +37,9 @@ func isMemoryBestEffort(container *api.Container) bool {
func isMemoryGuaranteed(container *api.Container) bool { func isMemoryGuaranteed(container *api.Container) bool {
// A container is memory guaranteed if its memory request == memory limit. // A container is memory guaranteed if its memory request == memory limit.
// If memory request == memory limit, the user is very confident of resource consumption. // If memory request == memory limit, the user is very confident of resource consumption.
memoryRequestValue := container.Resources.Requests.Memory().Value() memoryRequest := container.Resources.Requests.Memory()
memoryLimitValue := container.Resources.Limits.Memory().Value() memoryLimit := container.Resources.Limits.Memory()
return memoryRequestValue == memoryLimitValue && memoryRequestValue != 0 return (*memoryRequest).Cmp(*memoryLimit) == 0 && memoryRequest.Value() != 0
} }
// GetContainerOomAdjust returns the amount by which the OOM score of all processes in the // GetContainerOomAdjust returns the amount by which the OOM score of all processes in the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment