• Kubernetes Submit Queue's avatar
    Merge pull request #36549 from cjcullen/closetunnel · 98c68947
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Close tunnels after failed healthchecks.
    
    When we fail an ssh-tunnel healthcheck, we currently leak a file descriptor keeping the SSH connection open.
    
    This closes the underlying tunnel before removing our pointer to it. It is possible that the tunnel was functional, but the healthcheck failed for some other reason (e.g. kubelet healthz down), which could close an in-use tunnel, but I think that is acceptable.
    98c68947
ssh.go 15 KB