Skip to content

Bug 1820595: Support for specific http proxy for the service#87

Merged
openshift-merge-robot merged 7 commits intoopenshift:masterfrom
martinkunc:allow-specific-http-proxy-from-secret
Apr 1, 2020
Merged

Bug 1820595: Support for specific http proxy for the service#87
openshift-merge-robot merged 7 commits intoopenshift:masterfrom
martinkunc:allow-specific-http-proxy-from-secret

Conversation

@martinkunc
Copy link
Copy Markdown
Contributor

@martinkunc martinkunc commented Mar 19, 2020

This change allows to override proxy passed with Env using support secret.
It uses golang build-in proxy settings, including noproxy logic.

@martinkunc martinkunc changed the title Support for specific http proxy for the service WIP: Support for specific http proxy for the service Mar 19, 2020
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 19, 2020
@martinkunc
Copy link
Copy Markdown
Contributor Author

/retest

@martinkunc martinkunc changed the title WIP: Support for specific http proxy for the service Support for specific http proxy for the service Mar 20, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 20, 2020
Comment thread pkg/insights/insightsclient/insightsclient_test.go Outdated
@martinkunc
Copy link
Copy Markdown
Contributor Author

/retest

5 similar comments
@martinkunc
Copy link
Copy Markdown
Contributor Author

/retest

@martinkunc
Copy link
Copy Markdown
Contributor Author

/retest

@martinkunc
Copy link
Copy Markdown
Contributor Author

/retest

@martinkunc
Copy link
Copy Markdown
Contributor Author

/retest

@martinkunc
Copy link
Copy Markdown
Contributor Author

/retest

},
{
Name: "Env set, specific proxy set noproxy, request without noproxy",
EnvValues: map[string]interface{}{"HTTPS_PROXY": "envsecproxy.to", "NO_PROXY": "envnoproxy.to"},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure about HTTP/S_PROXY values, but shouldn't the NO_PROXY support multiple values?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi, it should, there is just no test for that..

@martinkunc
Copy link
Copy Markdown
Contributor Author

/assign smarterclayton

}

// FromConfig is setting HttpProxy from HttpConfig in support secret, if it is used
func FromConfig(c config.HTTPConfig) func(req *http.Request) (*url.URL, error) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ProxyFromConfig as name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, these two methods are confusingly named in general. This should probably be NewProxyFromConfig() in the line above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed them when I moved the logic to authorizer and removed options to simplify a bit.


type Authorizer interface {
Authorize(req *http.Request) error
HTTPConfig() config.HTTPConfig
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is the authorizer not handling the proxy setup? It already has all the config info.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I moved it there. If you ment something like a Roundtripper with dynamic injectable Proxy, I can prepare it as well, but at first it seemed a bit too much code.

@alexandrevicenzi
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 1, 2020
@alexandrevicenzi
Copy link
Copy Markdown
Contributor

@martinkunc we need this in 4.3 as well.

…rtinkunc/insights-operator into allow-specific-http-proxy-from-secret
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 1, 2020
@martinkunc
Copy link
Copy Markdown
Contributor Author

I tried to squeeze the changes, which invalidated the lgtms, sorry.

@martinkunc
Copy link
Copy Markdown
Contributor Author

/retest

Copy link
Copy Markdown
Contributor

@alexandrevicenzi alexandrevicenzi left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 1, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexandrevicenzi, martinkunc

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-bot
Copy link
Copy Markdown
Contributor

/retest

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

2 similar comments
@openshift-bot
Copy link
Copy Markdown
Contributor

/retest

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

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest

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

@openshift-merge-robot openshift-merge-robot merged commit a4560d8 into openshift:master Apr 1, 2020
@martinkunc martinkunc changed the title Support for specific http proxy for the service Bug 1805940: Support for specific http proxy for the service Apr 3, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@martinkunc: Bugzilla bug 1805940 is in an unrecognized state (VERIFIED) and will not be moved to the MODIFIED state.

Details

In response to this:

Bug 1805940: Support for specific http proxy for the service

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.

@martinkunc martinkunc changed the title Bug 1805940: Support for specific http proxy for the service Bug 1820595: Support for specific http proxy for the service Apr 3, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@martinkunc: All pull requests linked via external trackers have merged: . Bugzilla bug 1820595 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1820595: Support for specific http proxy for the service

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-cherrypick-robot
Copy link
Copy Markdown

@martinkunc: #87 failed to apply on top of branch "release-4.4":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	go.mod
M	pkg/config/configobserver/configobserver.go
M	pkg/insights/insightsclient/insightsclient.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/insights/insightsclient/insightsclient.go
CONFLICT (content): Merge conflict in pkg/insights/insightsclient/insightsclient.go
Auto-merging pkg/config/configobserver/configobserver.go
Auto-merging go.mod
CONFLICT (content): Merge conflict in go.mod
Patch failed at 0001 Support for specific http proxy for the service

Details

In response to this:

/cherry-pick release-4.4

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-cherrypick-robot
Copy link
Copy Markdown

@martinkunc: #87 failed to apply on top of branch "release-4.3":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	go.mod
M	pkg/config/configobserver/configobserver.go
M	pkg/insights/insightsclient/insightsclient.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/insights/insightsclient/insightsclient.go
CONFLICT (content): Merge conflict in pkg/insights/insightsclient/insightsclient.go
Auto-merging pkg/config/configobserver/configobserver.go
Auto-merging go.mod
CONFLICT (content): Merge conflict in go.mod
Patch failed at 0001 Support for specific http proxy for the service

Details

In response to this:

/cherry-pick release-4.3

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.

@martinkunc
Copy link
Copy Markdown
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@martinkunc: Bugzilla bug 1820595 is in an unrecognized state (MODIFIED) and will not be moved to the MODIFIED state.

Details

In response to this:

/bugzilla refresh

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.

@martinkunc
Copy link
Copy Markdown
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@martinkunc: All pull requests linked via external trackers have merged: . Bugzilla bug 1820595 has been moved to the MODIFIED state.

Details

In response to this:

/bugzilla refresh

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants