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

deployment: add env vars from the Proxy object #155

Merged
merged 1 commit into from Jul 31, 2019

Conversation

stlaz
Copy link
Member

@stlaz stlaz commented Jul 24, 2019

The Proxy object specifies certain http-proxy related environmnent
variables that we need setting for the operand's cotainer.

/cc @sttts @enj

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 24, 2019
@stlaz stlaz changed the title [WIP] deployment: add env vars from the Proxy object deployment: add env vars from the Proxy object Jul 25, 2019
@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 Jul 25, 2019
@stlaz
Copy link
Member Author

stlaz commented Jul 25, 2019

Let's deal with the CA bundle once the networking team actually provides us with one -> can be reviewed.

pkg/operator2/proxy.go Outdated Show resolved Hide resolved
@@ -400,6 +403,9 @@ func (c *authOperator) handleSync(operatorConfig *operatorv1.Authentication) err
return err
}

proxyConfig := c.handleProxyConfig()
resourceVersions = append(resourceVersions, proxyConfig.GetResourceVersion())
Copy link
Contributor

Choose a reason for hiding this comment

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

It annoys me that this adds another thing that needs explicit RV tracking. Oh well.

Use proxyConfig.ResourceVersion directly - the generic methods should only be used when dealing with Object Meta generically, not when you have a specific type.

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess most of it could be replaced with the config-observation logic as done in {K,O}AS-O, we'd probably only be left with checking the resource versions of configmaps/secrets (for CA/cert+priv key updates)

pkg/operator2/deployment.go Outdated Show resolved Hide resolved
pkg/operator2/deployment.go Show resolved Hide resolved
@@ -236,6 +238,24 @@ func getImagePullPolicy(operatorDeployment *appsv1.Deployment) corev1.PullPolicy
return containers[0].ImagePullPolicy
}

func proxyConfigToEnvVars(proxy *configv1.Proxy) []corev1.EnvVar {
Copy link
Contributor

Choose a reason for hiding this comment

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

This assumes that the transports that the OAuth server uses honors these proxy headers. I would like an e2e to prove that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Testing is huge topic that is still unaddressed throughout the whole proxy initiative. This will be follow-up.

The Proxy object specifies certain http-proxy related environmnent
variables that we need setting for the operand's cotainer.
@enj
Copy link
Contributor

enj commented Jul 31, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enj, stlaz

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

The pull request process is described here

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
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 645d275 into openshift:master Jul 31, 2019
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants