![]() Automatic merge from submit-queue Generify kube-proxy conntracker setmax() and refactor util/sysctl <!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md 2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md 3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes --> **What this PR does / why we need it**: Fix Kube-proxy `conntrack.go` **TODO** [here](https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-proxy/app/conntrack.go#L56). This PR consists of two parts: * Generify kube-proxy `realConntracker.SetMax(int)` That is, change `ioutil.WriteFile("/sys/module/nf_conntrack/parameters/hashsize", []byte(strconv.Itoa(max/4)), 0640)` to `sysctl.New().WriteValue("/sys/module/nf_conntrack/parameters/hashsize", max/4)` * Refactor `sysctl.SetSysctl()` and `sysctl.GetSysctl()` to `WriteValue(path string, value string) error` and `GetValue(path value) (error, string)` |
||
---|---|---|
.. | ||
app | ||
proxy.go |