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

Add tests to cover override behaviour for IngressRoute and HTTPProxy #1981

Merged
merged 1 commit into from Dec 12, 2019

Conversation

youngnick
Copy link
Member

Fixes #1949

Issue #1949 is about ensuring that HTTPProxy objects will override IngressRoute
ones when they match on {FQDN, path} tuple. Turns out this is already the case,
this PR adds tests to assert this behaviour.

The tests have an Ingress, IngressRoute, and HTTPProxy that are identical aside from the service where the traffic is routed to, and assert that the override behaviour holds based on which service ends up chosen.

Note that routes that are not exactly the same (on FQDN, path tuple), will just be additive, no matter where they come from. This is why the cert-manager ingress-shim thing works.

Signed-off-by: Nick Young ynick@vmware.com

@youngnick
Copy link
Member Author

After some discussion with Dave, this is missing some tests, and a feature: The ingressroute that is superseded by the HTTPProxy should have an invalid status. I'll work more on this tomorrow.

@@ -5479,6 +5550,57 @@ func TestDAGInsert(t *testing.T) {
},
),
},
// This tests what happens when you build with an ingressroute and a HTTPProxy
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: try the imperative mood

// Assert that a route in IngressRoute takes precedence over Ingress.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, good idea, that's much more concise. I'll change this, and then merge.

@davecheney
Copy link
Contributor

pls ignore my previous reply, wrong window

Fixes projectcontour#1949

Issue projectcontour#1949 is about ensuring that HTTPProxy objects will override IngressRoute
ones when they match on {FQDN, path} tuple. Turns out this is already the case,
this PR adds tests to assert this behaviour.

Signed-off-by: Nick Young <ynick@vmware.com>
Copy link
Contributor

@jpeach jpeach left a comment

Choose a reason for hiding this comment

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

LGTM

@davecheney
Copy link
Contributor

@youngnick ping, this Is approved, are you ok to land it?

@youngnick
Copy link
Member Author

Sorry, yes, will land it now.

@youngnick youngnick merged commit f2bc02d into projectcontour:master Dec 12, 2019
@youngnick youngnick deleted the 1949-IRandHPpriority branch April 27, 2020 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTPProxy should overwrite IngressRoute if there is a conflict
3 participants