mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
ipvs: only attempt setting of sysctlconnreuse on supported kernels
This builds on previous work but only sets the sysctlConnReuse value if the kernel is known to be above 4.19. To avoid calling GetKernelVersion twice, I store the value from the CanUseIPVS method and then check the version constraint at time of expected sysctl call. Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
This commit is contained in:
@@ -276,6 +276,7 @@ func newProxyServer(
|
||||
healthzServer,
|
||||
config.IPVS.Scheduler,
|
||||
config.NodePortAddresses,
|
||||
kernelHandler,
|
||||
)
|
||||
} else {
|
||||
var localDetector proxyutiliptables.LocalTrafficDetector
|
||||
@@ -306,6 +307,7 @@ func newProxyServer(
|
||||
healthzServer,
|
||||
config.IPVS.Scheduler,
|
||||
config.NodePortAddresses,
|
||||
kernelHandler,
|
||||
)
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user