Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix transport issue with WATCH #263

Open
szuecs opened this issue Oct 28, 2020 · 0 comments
Open

fix transport issue with WATCH #263

szuecs opened this issue Oct 28, 2020 · 0 comments

Comments

@szuecs
Copy link
Member

szuecs commented Oct 28, 2020

Original issue kubernetes/client-go#374 (comment)
This could cause no update for 30 minutes...
Recent comments suggest that we can fix it and use http2 Transport for connecting to kube-apiserver and set ReadIdleTimeout: https://github.com/golang/net/blob/release-branch.go1.15/http2/transport.go#L117

we would need to switch all controllers that rely on WATCH to Go1.15 in order to fix this

import 	"golang.org/x/net/http2"
func configureKubeConfig(apiServerURL *url.URL, timeout time.Duration, stopCh <-chan struct{}) (*rest.Config, error) {
	tr := &http2.Transport{
                 ....
		ReadIdleTimeout:       10 * time.Second,   // <--
	}

...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant