Skip to content

fix transport issue with WATCH #263

@szuecs

Description

@szuecs

Original issue https://github.com/kubernetes/client-go/issues/374#issuecomment-716846816
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,   // <--
	}

...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions