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

Make updating status on the router optional #17420

Merged

Conversation

smarterclayton
Copy link
Contributor

User can specify --update-status=false on the router to have a router that doesn't write back to routes. The default is true for backwards compatibilty. Allows testing routers when you don't have route status/update.

Also unify a number of host setup paths. Makes F5 and template more consistent.

Question for reviewer - on the F5 plugin we weren't performing a number of "standard" operations like setting the canonical hostname. Was there a concrete reason for that?

@openshift/sig-networking

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 22, 2017
@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2017
@knobunc
Copy link
Contributor

knobunc commented Nov 28, 2017

LGTM (not saying the other way so the bot doesn't merge it yet)

Regarding the difference, I think that was an unintentional error. We should have been writing the canonical name in for the F5 case.

@knobunc
Copy link
Contributor

knobunc commented Nov 28, 2017

BTW the test failed due to missing completions.

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 28, 2017
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 28, 2017
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 28, 2017
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 28, 2017
@smarterclayton
Copy link
Contributor Author

smarterclayton commented Nov 28, 2017 via email

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 23, 2018
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 10, 2018
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 10, 2018
@smarterclayton
Copy link
Contributor Author

Updated with an e2e test that correctly validates status is not set (and adds a test to scoped router to verify status is set)

@smarterclayton
Copy link
Contributor Author

Test failure for GCP is because the image isn't updated

@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton
Copy link
Contributor Author

Please review, this is ready for merge once we branch (I'll disable the test before merge, then enable once we've published it).

@smarterclayton
Copy link
Contributor Author

@ramr if you can give a final pass

Copy link
Contributor

@ramr ramr left a comment

Choose a reason for hiding this comment

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

@smarterclayton just 1 comment - unless something has changed, think it is a typo (copy-pasta) as I saw the same changes in pkg/cmd/infra/router/template.go.

plugin = controller.NewExtendedValidator(plugin, recorder)
}
plugin = controller.NewUniqueHost(plugin, o.RouteSelectionFunc(), o.RouterSelection.DisableNamespaceOwnershipCheck, recorder)
plugin = controller.NewHostAdmitter(plugin, o.F5RouteAdmitterFunc(), o.AllowWildcardRoutes, o.RouterSelection.DisableNamespaceOwnershipCheck, recorder)
Copy link
Contributor

Choose a reason for hiding this comment

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

false instead of o.AllowWildcardRoutes
I didn't think we supported wildcard routes on the F5 router? AFAICR, it was doing an exact host match in the lookup. That said my knowledge is a bit dated - so maybe that's changed - @Miciah / @rajatchopra can confirm.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I didn't want the code to drift. If we add it, it can be done in the admitter func.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can understand that. Am ok with the change but just wanted to call out here that if someone accidentally sets an environment variable to allow wildcard routes to the F5 router, it may cause different behavior (well untested previously) in the host admitter https://github.com/smarterclayton/origin/blob/3ac3cd0562bf2f3cc55f80500d6ed410813d1402/pkg/router/controller/host_admitter.go#L131.

Copy link
Contributor

Choose a reason for hiding this comment

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

We are planning to deprecate the F5 Router pretty soon, anyway. So its a no factor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deprecate or remove?

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove eventually. It will stay until the field is ready to go fully with the container connector solution by F5.
The deprecation notice will be up in 3.9 docs.

Also unify a number of host setup paths. Makes F5 and template more
consistent.
Verify that a router running in a namespace does update status if it has
permission.
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smarterclayton

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

@smarterclayton
Copy link
Contributor Author

Test disabled until after merge and an image is cut, then i'll have another PR to enable it.

@smarterclayton smarterclayton added the lgtm Indicates that a PR is ready to be merged. label Mar 1, 2018
@smarterclayton
Copy link
Contributor Author

Applying label after discussion with ram

@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot openshift-merge-robot merged commit 6e85fcc into openshift:master Mar 1, 2018
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