jetstack / version-checker

Kubernetes utility for exposing image versions in use, compared to latest available upstream, as metrics.
https://jetstack.io
Apache License 2.0
665 stars 76 forks source link

enable proxy for remaining clients #152

Closed davidcollom closed 4 months ago

davidcollom commented 4 months ago

On the back of #145 this add's support for the remaining Clients as there may be proxies across the entire environment

aidy commented 4 months ago

I don't think this was necessary.

It was required in #145, as you were providing a Transport object. In these cases, Transport was nil, and so should default to DefaultTransport (https://cs.opensource.google/go/go/+/refs/tags/go1.22.0:src/net/http/client.go;l=60), which already has ProxyFromEnvironment set (https://github.com/golang/go/blob/master/src/net/http/transport.go#L44).

imo, it's better to leave it as nil so that you're sure to retain the other characteristics of DefaultTransport.