mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #37793 from caiyixiang/proxy
Automatic merge from submit-queue (batch tested with PRs 37066, 37793) correct a few spelling mistakes
This commit is contained in:
commit
0bea8ca301
@ -383,17 +383,17 @@ func getConntrackMax(config *options.ProxyServerConfig) (int, error) {
|
||||
if config.ConntrackMaxPerCore > 0 {
|
||||
return -1, fmt.Errorf("invalid config: ConntrackMax and ConntrackMaxPerCore are mutually exclusive")
|
||||
}
|
||||
glog.V(3).Infof("getConntrackMax: using absolute conntrax-max (deprecated)")
|
||||
glog.V(3).Infof("getConntrackMax: using absolute conntrack-max (deprecated)")
|
||||
return int(config.ConntrackMax), nil
|
||||
}
|
||||
if config.ConntrackMaxPerCore > 0 {
|
||||
floor := int(config.ConntrackMin)
|
||||
scaled := int(config.ConntrackMaxPerCore) * runtime.NumCPU()
|
||||
if scaled > floor {
|
||||
glog.V(3).Infof("getConntrackMax: using scaled conntrax-max-per-core")
|
||||
glog.V(3).Infof("getConntrackMax: using scaled conntrack-max-per-core")
|
||||
return scaled, nil
|
||||
}
|
||||
glog.V(3).Infof("getConntrackMax: using conntrax-min")
|
||||
glog.V(3).Infof("getConntrackMax: using conntrack-min")
|
||||
return floor, nil
|
||||
}
|
||||
return 0, nil
|
||||
|
Loading…
Reference in New Issue
Block a user