-
Notifications
You must be signed in to change notification settings - Fork 33
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
PWX-32011: added https proxy support #1120
Conversation
Does this code have a support for
To address proxy-support in client := &http.Client{
Transport: &http.Transport{
Proxy: ProxyFromPxEnvironment,
},
}
So.. does Envoy/Telemetry react to the environment variables (i.e.
|
That's a good point @zoxpx , thanks for bring it up. Operator currently handles the case where no_proxy is required using this usePxProxy flag like (https://github.com/libopenstorage/operator/blob/master/drivers/storage/portworx/component/telemetry.go#L609) which basically tells which template of envoy config yaml to use. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1120 +/- ##
=======================================
Coverage 75.60% 75.61%
=======================================
Files 64 64
Lines 17871 17902 +31
=======================================
+ Hits 13512 13536 +24
- Misses 3400 3406 +6
- Partials 959 960 +1
☔ View full report in Codecov by Sentry. |
This PR is stale because it has been in review for 3 days with no activity. |
Did we ever get the proxy that Lap setup to work with https? |
No, actually used the squid https proxy set up as instructed here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is shocking -- you needed 1'500 lines of configuration files to set up proxy, where most Linux tools can do in one line (env http_proxy=xxx curl ...)
But, I suppose it is what it is.
I did log in a few questions/remarks, leaving it up to you if you want to clean it up before the commit.
// ParsePxProxy trims protocol prefix then splits the proxy address of the form "host:port" with possible basic authentication credential | ||
func ParsePxProxyURL(proxy string) (string, string, string, error) { | ||
if strings.HasPrefix(proxy, HttpsProtocolPrefix) && strings.Contains(proxy, "@") { | ||
proxy := strings.TrimPrefix(proxy, HttpsProtocolPrefix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm surprised you had to parse the URL like this --
- did https://pkg.go.dev/net/url#Parse not work for your specific use-case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mainly for retrieving the basic auth (user, password) from the url that customer puts in their STC's env variable and convert into header for envoy to pick up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. that should have worked OK -- the https://pkg.go.dev/net/url#URL does have an optional Userinfo
parameter, that should be parsing the user/passwd in URL correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bring it up. Yes, I should have be using that. Fixed in the latest commit
What this PR does / why we need it:
Enable HTTPS proxy for telemetry (diags phonehome and callhome)
Which issue(s) this PR fixes (optional)
Closes #
Special notes for your reviewer: