Skip to content
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

Bug 1506978 - Apply proxy settings to running APBs #654

Merged
merged 1 commit into from Jan 18, 2018

Conversation

eriknelson
Copy link
Contributor

  • Broker should inspect its own enviornment, and in the presence of
    a proxy configuration, should apply those settings to executing APBs.

* Broker should inspect its own enviornment, and in the presence of
a proxy configuration, should apply those settings to executing APBs.
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 18, 2018
@eriknelson
Copy link
Contributor Author

Currently trying to test this in the example locked down environment, but I confirmed the settings are being applied to running APBs as expected when the various env vars are set.

Copy link
Contributor

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

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

One question, but otherwise LGTM

httpsProxy, httpsProxyPresent := os.LookupEnv(httpsProxyEnvVar)
noProxy, noProxyPresent := os.LookupEnv(noProxyEnvVar)

// TODO: Probably some more permutations of these that should be validated?
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be made into an issue to be tracked?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. I can file an issue after this merges and follow up with a patch + tests. Need to figure out what combinations are valid vs. not valid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -201,6 +215,52 @@ func createExtraVars(context *Context, parameters *Parameters) (string, error) {
return string(extraVars), err
}

func createPodEnv(executionContext ExecutionContext) []v1.EnvVar {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@coveralls
Copy link

coveralls commented Jan 18, 2018

Coverage Status

Changes Unknown when pulling 6826358 on eriknelson:proxy-bug into ** on openshift:master**.

@eriknelson eriknelson added bug 3.9 | release-1.1 Kubernetes 1.9 | Openshift 3.9 | Broker release-1.1 needs-review labels Jan 18, 2018
Copy link
Contributor

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

ACK

},
},
},
Env: createPodEnv(executionContext),
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice cleanup!

NoProxy: noProxy,
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -201,6 +215,52 @@ func createExtraVars(context *Context, parameters *Parameters) (string, error) {
return string(extraVars), err
}

func createPodEnv(executionContext ExecutionContext) []v1.EnvVar {
Copy link
Contributor

Choose a reason for hiding this comment

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

EXCELLENT!

@jmrodri jmrodri merged commit 85d78d7 into openshift:master Jan 18, 2018
jianzhangbjz pushed a commit to jianzhangbjz/ansible-service-broker that referenced this pull request May 17, 2018
* Broker should inspect its own enviornment, and in the presence of
a proxy configuration, should apply those settings to executing APBs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.9 | release-1.1 Kubernetes 1.9 | Openshift 3.9 | Broker release-1.1 size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants