fix list namespaces

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2020-05-07 09:14:54 +08:00
parent af59940ed2
commit 992be764a1
5 changed files with 367 additions and 27 deletions

View File

@@ -35,8 +35,8 @@ func WithKubeAPIServer(handler http.Handler, config *rest.Config, failed proxy.E
// Do not cover k8s client authorization header
req.Header.Del("Authorization")
httpProxy := proxy.NewUpgradeAwareHandler(&s, defaultTransport, true, false, failed)
httpProxy.UpgradeTransport = proxy.NewUpgradeRequestRoundTripper(defaultTransport, defaultTransport)
httpProxy.ServeHTTP(w, req)
return
}