Add a lower-bound for conntrack

This commit is contained in:
Tim Hockin
2016-09-23 14:59:15 -07:00
parent a61a1f51f3
commit 957c85a8fd
12 changed files with 3565 additions and 3472 deletions

View File

@@ -313,10 +313,25 @@ func TestGetConntrackMax(t *testing.T) {
},
{
config: componentconfig.KubeProxyConfiguration{
ConntrackMaxPerCore: 67890, // use this if other is 0
ConntrackMaxPerCore: 67890, // use this if Max is 0
ConntrackMin: 1, // avoid 0 default
},
expected: 67890 * ncores,
},
{
config: componentconfig.KubeProxyConfiguration{
ConntrackMaxPerCore: 1, // ensure that Min is considered
ConntrackMin: 123456,
},
expected: 123456,
},
{
config: componentconfig.KubeProxyConfiguration{
ConntrackMaxPerCore: 0, // leave system setting
ConntrackMin: 123456,
},
expected: 0,
},
}
for i, tc := range testCases {