Skip to content

deployment: add env vars from the Proxy object#155

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
stlaz:proxy_observing
Jul 31, 2019
Merged

deployment: add env vars from the Proxy object#155
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
stlaz:proxy_observing

Conversation

@stlaz
Copy link
Copy Markdown
Contributor

@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 requested review from enj and sttts July 24, 2019 13:36
@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
Copy Markdown
Contributor 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.

Comment thread pkg/operator2/proxy.go Outdated
Comment thread pkg/operator2/operator.go Outdated
}

proxyConfig := c.handleProxyConfig()
resourceVersions = append(resourceVersions, proxyConfig.GetResourceVersion())
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.

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
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 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)

Comment thread pkg/operator2/deployment.go Outdated
Comment thread pkg/operator2/deployment.go
return containers[0].ImagePullPolicy
}

func proxyConfigToEnvVars(proxy *configv1.Proxy) []corev1.EnvVar {
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.

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

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.

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

@stlaz stlaz force-pushed the proxy_observing branch from 3731453 to 0af44e3 Compare July 30, 2019 08:18
The Proxy object specifies certain http-proxy related environmnent
variables that we need setting for the operand's cotainer.
@stlaz stlaz force-pushed the proxy_observing branch from 0af44e3 to 67da852 Compare July 30, 2019 08:20
@enj
Copy link
Copy Markdown
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
Copy Markdown
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

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.

@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.

6 participants