• Kubernetes Submit Queue's avatar
    Merge pull request #63492 from liggitt/node-heartbeat-close-connections · 8220171d
    Kubernetes Submit Queue authored
    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
    ```
    8220171d
Name
Last commit
Last update
..
api Loading commit data...
apis Loading commit data...
auth Loading commit data...
capabilities Loading commit data...
client Loading commit data...
cloudprovider Loading commit data...
controller Loading commit data...
credentialprovider Loading commit data...
features Loading commit data...
fieldpath Loading commit data...
generated Loading commit data...
kubeapiserver Loading commit data...
kubectl Loading commit data...
kubelet Loading commit data...
kubemark Loading commit data...
master Loading commit data...
printers Loading commit data...
probe Loading commit data...
proxy Loading commit data...
quota Loading commit data...
registry Loading commit data...
routes Loading commit data...
scheduler Loading commit data...
security Loading commit data...
securitycontext Loading commit data...
serviceaccount Loading commit data...
ssh Loading commit data...
util Loading commit data...
version Loading commit data...
volume Loading commit data...
watch/json Loading commit data...
windows/service Loading commit data...
.import-restrictions Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...