-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Client transports no longer implement WrappedRoundTripper() #19885
Comments
This implementation depends on transports constructed from kubeconfig files conforming to the
|
Interesting. We can certainly add them back for now, but this seems like something that should be done another way. Why rely on a http.RoundTripper to supply a dialer and TLS config, especially when wrapping them is such a common idiom? Wouldn't it be better for the proxy/upgrade handlers to just know what Dialer and TLSConfig they should use instead of trying (and failing in this case) to discover from a naively wrapped http.RoundTripper? |
The proxy code handles generically proxying/upgrading connections to node, pod, and service back ends. The transport to use is part of what is handed to the proxy code. I'm fine with a refactor, but I'd like to unbreak this asap and work on a better solution at leisure. This is seen to have an effect when connecting to things with custom dialers like GKE and a tunneling dialer |
Agreed whole-heartedly with quick fix + thinking about a better way. Are you doing this? Or should I? FWIW this is a similar situation to http.Transport.CancelRequest(). People naively wrapped the round tripper, http.Client's Timeout would no longer worked. They ended up bypassing the need to type assert down to that method by adding a Cancel channel to the http.Request object. |
Also, there are e2e tests that should have caught this, but they may have been conditionalized away in GKE :-/ |
If you can, I can do a quick review |
#16126 removed the implementations of
WrappedRoundTripper() http.RoundTripper
present in all of the client transports.This is required to allow the proxy handlers to drill down and use the Dial and TLSConfig data in the innermost http.Transport when doing upgrade requests.
@krousey
The text was updated successfully, but these errors were encountered: