e2e: add kubelet resource usage test to monitor 100 pods per node

This commit is contained in:
Yu-Ju Hong 2016-03-02 15:22:40 -08:00
parent d644062445
commit 216727c448

View File

@ -135,7 +135,7 @@ func verifyMemoryLimits(expected resourceUsagePerContainer, actual resourceUsage
} }
} }
if len(errList) > 0 { if len(errList) > 0 {
Failf("CPU usage exceeding limits:\n %s", strings.Join(errList, "\n")) Failf("Memory usage exceeding limits:\n %s", strings.Join(errList, "\n"))
} }
} }
@ -204,7 +204,8 @@ var _ = Describe("Kubelet [Serial] [Slow]", func() {
// deliberately set higher resource usage limits to account for the // deliberately set higher resource usage limits to account for the
// noise. // noise.
rTests := []resourceTest{ rTests := []resourceTest{
{podsPerNode: 0, {
podsPerNode: 0,
cpuLimits: containersCPUSummary{ cpuLimits: containersCPUSummary{
"/kubelet": {0.50: 0.06, 0.95: 0.08}, "/kubelet": {0.50: 0.06, 0.95: 0.08},
"/docker-daemon": {0.50: 0.05, 0.95: 0.06}, "/docker-daemon": {0.50: 0.05, 0.95: 0.06},
@ -216,9 +217,8 @@ var _ = Describe("Kubelet [Serial] [Slow]", func() {
"/docker-daemon": &containerResourceUsage{MemoryRSSInBytes: 85 * 1024 * 1024}, "/docker-daemon": &containerResourceUsage{MemoryRSSInBytes: 85 * 1024 * 1024},
}, },
}, },
// TODO(yujuhong): change this test to ~100 pods per node after {
// --max-pods have been changed. podsPerNode: 35,
{podsPerNode: 35,
cpuLimits: containersCPUSummary{ cpuLimits: containersCPUSummary{
"/kubelet": {0.50: 0.12, 0.95: 0.14}, "/kubelet": {0.50: 0.12, 0.95: 0.14},
"/docker-daemon": {0.50: 0.06, 0.95: 0.08}, "/docker-daemon": {0.50: 0.06, 0.95: 0.08},
@ -230,6 +230,10 @@ var _ = Describe("Kubelet [Serial] [Slow]", func() {
"/docker-daemon": &containerResourceUsage{MemoryRSSInBytes: 100 * 1024 * 1024}, "/docker-daemon": &containerResourceUsage{MemoryRSSInBytes: 100 * 1024 * 1024},
}, },
}, },
{
// TODO(yujuhong): Set the limits after collecting enough data.
podsPerNode: 100,
},
} }
for _, testArg := range rTests { for _, testArg := range rTests {
itArg := testArg itArg := testArg