mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
improve reporting of which resources and which binaries went over limit
This commit is contained in:
parent
43f9280a5d
commit
c9c6c52ab4
@ -119,7 +119,16 @@ var _ = Describe("Resource usage of system containers", func() {
|
||||
for container, cUsage := range usage {
|
||||
Logf("%v on %v usage: %#v", container, node, cUsage)
|
||||
if !allowedUsage[container].isStrictlyGreaterThan(cUsage) {
|
||||
violating[node] = usage
|
||||
if allowedUsage[container].CPUUsageInCores < cUsage.CPUUsageInCores {
|
||||
Logf("CPU is too high for %s (%v)", container, cUsage.CPUUsageInCores)
|
||||
}
|
||||
if allowedUsage[container].MemoryUsageInBytes < cUsage.MemoryUsageInBytes {
|
||||
Logf("Memory use is too high for %s (%v)", container, cUsage.MemoryUsageInBytes)
|
||||
}
|
||||
if allowedUsage[container].MemoryWorkingSetInBytes < cUsage.MemoryWorkingSetInBytes {
|
||||
Logf("Working set is too high for %s (%v)", container, cUsage.MemoryWorkingSetInBytes)
|
||||
}
|
||||
violating[node][container] = usage[container]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user