Skip to content

fixing http/s proxy handling for openshift provider#96

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
patlachance:issue-71-http-proxy-fix
Feb 5, 2019
Merged

fixing http/s proxy handling for openshift provider#96
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
patlachance:issue-71-http-proxy-fix

Conversation

@patlachance
Copy link
Copy Markdown

Fixes #71

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 10, 2018
@openshift-ci-robot
Copy link
Copy Markdown

Hi @patlachance. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 10, 2018
@pgier
Copy link
Copy Markdown

pgier commented Nov 11, 2018

/ok-to-test

@openshift-ci-robot openshift-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 11, 2018
return err
}
p.Client.Transport = &http.Transport{
Proxy: http.ProxyFromEnvironment,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should modify the transport for this outside of the setCA function.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http_proxy and https_proxy environment variables are handled by http.DefaultTransport. This function is used to set custom CA on the transport but IMO it shouldn't discard other http.DefaultTransport default properties. But this is what is does since we need to change it later so it handle proxy env variables again.

I couldn't find a way to extend the p.client.transport outside this function without having to define the custom CA as well in the new function.

Any idea how to do it?

@brancz
Copy link
Copy Markdown

brancz commented Nov 13, 2018

@openshift/sig-auth

@mrogers950
Copy link
Copy Markdown

@patlachance please modify your patch to set the transport proxy outside of setCA() (after it's called in LoadDefaults()). That's my only feedback and then we will be OK to merge.

@patlachance
Copy link
Copy Markdown
Author

@mrogers950 please see comment on your review. Don't know how to do it without managing custom CA at the same time.

@mrogers950
Copy link
Copy Markdown

@patlachance sorry for the delay, I see what you're saying about setting the transport here. If you can also change the function name to setCAandTransportProxy or similar, that would be acceptable, just to make it clear that the function is doing both of these things.

@patlachance
Copy link
Copy Markdown
Author

@mrogers950 ok I’ll do it over the weekend.

@mrogers950
Copy link
Copy Markdown

/test all

@mrogers950
Copy link
Copy Markdown

@patlachance I'm still waiting on your fixup. I'd be willing to open a separate PR and push the fix through myself if you have not had the time to return to this, just let me know.

@patlachance patlachance force-pushed the issue-71-http-proxy-fix branch from df54b51 to ed457d2 Compare February 3, 2019 09:14
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 3, 2019
@patlachance patlachance force-pushed the issue-71-http-proxy-fix branch from ed457d2 to 70cab08 Compare February 3, 2019 10:08
@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 3, 2019
@patlachance
Copy link
Copy Markdown
Author

@mrogers950 sorry for the delay. Done now!

@openshift-ci-robot
Copy link
Copy Markdown

@patlachance: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

@mrogers950 sorry for the delay. Done now!

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mrogers950
Copy link
Copy Markdown

@patlachance looks good, thank you for your contribution!
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 5, 2019
@openshift-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrogers950, patlachance

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 5, 2019
@mrogers950
Copy link
Copy Markdown

/ok-to-test

@openshift-ci-robot openshift-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 5, 2019
@openshift-bot
Copy link
Copy Markdown

/retest

Please review the full test history for this PR and help us cut down flakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants