Skip to content

Conversation

@danehans
Copy link
Contributor

@danehans danehans commented Jul 16, 2019

Required by #271

  • Add controller to reconcile Proxy object.
  • Validate Proxy.spec fields.
  • Write http|https|no Proxy spec to status upon successful validation.

Note: Proxy CA reconciliation requirements are being addressed in #271.

Jira: SDN-492

PTAL @squeed @openshift/networking

@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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 16, 2019
@danehans
Copy link
Contributor Author

/assign @squeed

@danwinship
Copy link
Contributor

Should proxy reconciliation result be reflected in network operator status?

Yes, and adding a new StatusLevel as you did is correct.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 18, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 22, 2019
}

// Watch for changes to primary resource config.openshift.io/v1/Proxy
err = c.Watch(&source.Kind{Type: &configv1.Proxy{}}, &handler.EnqueueRequestForObject{})
Copy link
Contributor

Choose a reason for hiding this comment

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

It probably makes sense here to watch for changes to configv1.Network here too, so we can get the Network.Status field.

@openshift-ci-robot openshift-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 24, 2019
@danwinship
Copy link
Contributor

Given the possibility of us having to deal with other abstractly-proxy-related things in the future, I think the naming should be more specific than just "proxy" (eg, in pkg/proxy/). Maybe "cluster-proxy" or "operator-proxy"? Or one of those plus "egress". Or cluster-operator-egress-proxy...

And if this is likely to be maintained by the edge team going forward then the directories should get their own OWNERS files. (And we should start reorganizing pkg/network/ too since this would now make two files there that aren't owned by the SDN team.)

)
platform := infra.Status.PlatformStatus.Type

// TODO: Does a better way exist to get machineCIDR and controlplane replicas?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@squeed @danwinship PTAL and let me know if you have a better approach for parsing replicas and machineCIDR from the installer config or using some other resource to get the data.

@danehans danehans force-pushed the proxy_reconciler branch 3 times, most recently from b8ab96a to 2ea1c4c Compare July 26, 2019 17:45
@danehans
Copy link
Contributor Author

Given the possibility of us having to deal with other abstractly-proxy-related things in the future, I think the naming should be more specific than just "proxy" (eg, in pkg/proxy/)

@danwinship good call. I'll update the naming based on one of your suggestions.

And if this is likely to be maintained by the edge team going forward then the directories should get their own OWNERS files. (And we should start reorganizing pkg/network/ too since this would now make two files there that aren't owned by the SDN team.)

@knobunc can you confirm who will own the proxy controller? @danwinship it's my understanding that I'm helping with the proxy controller implementation, but the network edge team is not responsible for maintaining.

@danehans danehans force-pushed the proxy_reconciler branch 3 times, most recently from 77f1476 to 150521e Compare July 30, 2019 21:10
@danehans
Copy link
Contributor Author

danehans commented Aug 6, 2019

/test e2e-aws

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 6, 2019
Copy link

@bparees bparees left a comment

Choose a reason for hiding this comment

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

couple minor comments, otherwise lgtm.

@danehans
Copy link
Contributor Author

danehans commented Aug 8, 2019

@squeed @bparees I addressed booth of your comments in my latest commit, PTAL.

return fmt.Errorf("invalid httpsProxy URI: %v", err)
}
if scheme != proxyHTTPScheme && scheme != proxyHTTPSScheme {
return fmt.Errorf("httpsProxy requires a %q or %s URI scheme", proxyHTTPScheme, proxyHTTPSScheme)
Copy link

Choose a reason for hiding this comment

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

why is one of these %q and the other %s?

@squeed
Copy link
Contributor

squeed commented Aug 8, 2019

/approve
/lgtm

Please take a note of the follow-up issues.

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danehans, squeed

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-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 8, 2019
@openshift-merge-robot openshift-merge-robot merged commit c7c18b7 into openshift:master Aug 8, 2019
wking added a commit to wking/openshift-docs that referenced this pull request Oct 29, 2019
Drop the wording from aa39bf3 (OSDOCS-640: Adding docs for
configuring proxy during installation, 2019-09-12, openshift#16635), because
the network operator explicitly supports both the 'http' and 'https'
schemes since openshift/cluster-network-operator@42dbcf8955 (Refactors
PR to focus on http/https/no proxy reconciliation, 2019-08-06,
openshift/cluster-network-operator#245), which landed before
release-4.2 split off from the network operator's master.
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/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.

9 participants