Skip to content

Conversation

@bertinatto
Copy link
Member

@bertinatto bertinatto commented Jan 7, 2021

This PR adds two new functionalities to the CSI pieces of library-go:

csi: add configobserver to watch proxy info

Cloud CSI drivers perform all sorts of operations using the cloud API. However, that's not possible in network-restricted clusters, where requests need to go through a given proxy, unless they target the API server.

This patch adds a CSI Config Observer controller to observe the proxy resource and record the information in the operator CR. It also patches the CSI Controller Service Controller to read this information and pass it to the CSI containers that are part of the Deployment.

csi: add hook that annotates deployment with secret's hash

This is useful for when the secret changes. In this case we want the deployment to be re-deployed.

/assign @deads2k

@bertinatto bertinatto force-pushed the csi-proxy branch 6 times, most recently from 5d30bec to 2a4c239 Compare January 8, 2021 18:05
@bertinatto bertinatto changed the title csi: add configobserver to watch proxy info csi: add configobserver to watch for proxy info Jan 8, 2021
@bertinatto bertinatto force-pushed the csi-proxy branch 3 times, most recently from 006efef to b6a80c9 Compare January 8, 2021 22:51
@bertinatto bertinatto force-pushed the csi-proxy branch 4 times, most recently from dcf095c to 6812af3 Compare January 11, 2021 14:17
@bertinatto bertinatto changed the title csi: add configobserver to watch for proxy info csi: add configobserver controller and hook helpers Jan 11, 2021
deployment.Spec.Template.Annotations = map[string]string{}
}
for k, v := range inputHashes {
annotationKey := fmt.Sprintf("operator.openshift.io/dep-%s", k)
Copy link
Member

Choose a reason for hiding this comment

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

lets move this into a var/constant

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'd like to leave this on as is. I prefer to leave format strings inline, plus I couldn't re-use the const for the annotation below (%x != %s)

@gnufied
Copy link
Member

gnufied commented Jan 12, 2021

/lgtm

@deads2k
Copy link
Contributor

deads2k commented Jan 12, 2021

I think https://github.com/openshift/library-go/pull/976/files#r556138811 is my only blocker before approval. Good PR.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 13, 2021
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2021
Cloud CSI drivers perform all sorts of operations using the cloud API.
However, that's not possible in network-restricted clusters,
where requests need to go through a given proxy, unless they
target the API server.

This patch adds a CSI Config Observer controller to observe the proxy
resource and record the information in the operator CR. It also adds
a hook function to inject the observed proxy config into the
deployment's containers.
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2021
@bertinatto
Copy link
Member Author

/test all

@jsafrane
Copy link
Contributor

/refresh
(CI & github have some issues and github UI is not refreshed. See #announce-testplatform
.

@deads2k
Copy link
Contributor

deads2k commented Jan 13, 2021

Thanks,

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 13, 2021
@gnufied
Copy link
Member

gnufied commented Jan 13, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 13, 2021
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bertinatto, deads2k, gnufied

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

@huffmanca
Copy link
Contributor

/refresh

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.

7 participants