k3s/cmd/kubelet/app
Kubernetes Submit Queue 8220171d8a
Merge pull request #63492 from liggitt/node-heartbeat-close-connections
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

track/close kubelet->API connections on heartbeat failure

xref #48638
xref https://github.com/kubernetes-incubator/kube-aws/issues/598

we're already typically tracking kubelet -> API connections and have the ability to force close them as part of client cert rotation. if we do that tracking unconditionally, we gain the ability to also force close connections on heartbeat failure as well. it's a big hammer (means reestablishing pod watches, etc), but so is having all your pods evicted because you didn't heartbeat.

this intentionally does minimal refactoring/extraction of the cert connection tracking transport in case we want to backport this

* first commit unconditionally sets up the connection-tracking dialer, and moves all the cert management logic inside an if-block that gets skipped if no certificate manager is provided (view with whitespace ignored to see what actually changed)
* second commit plumbs the connection-closing function to the heartbeat loop and calls it on repeated failures

follow-ups:
* consider backporting this to 1.10, 1.9, 1.8
* refactor the connection managing dialer to not be so tightly bound to the client certificate management

/sig node
/sig api-machinery

```release-note
kubelet: fix hangs in updating Node status after network interruptions/changes between the kubelet and API server
```
2018-05-14 16:56:35 -07:00
..
options Merge pull request #62833 from charrywanganthony/log_rotation 2018-05-14 00:07:15 -07:00
BUILD Update bazel BUILD files 2018-04-11 09:26:02 -07:00
OWNERS
auth.go move KubeletConfiguration out of componentconfig API group 2017-08-15 08:12:42 -07:00
init_others.go Add support for binaries to run as Windows services 2018-03-07 00:51:36 +01:00
init_windows.go Add support for binaries to run as Windows services 2018-03-07 00:51:36 +01:00
plugins.go Move the kubelet network package down to dockershim 2018-04-11 09:25:56 -07:00
server.go Close all kubelet->API connections on heartbeat failure 2018-05-07 15:06:31 -04:00
server_linux.go
server_test.go Lift embedded structure out of eviction-related KubeletConfiguration fields 2017-11-16 18:35:13 -08:00
server_unsupported.go