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

Clarifying how conflicting matches should be resolved in non-HTTP Routes #626

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

robscott
Copy link
Member

What type of PR is this?
/kind cleanup
/kind documentation

What this PR does / why we need it:
This is a follow up from #620. It takes the conflict resolution guidance we added to HTTPRoute and applies it to the other route types.

Does this PR introduce a user-facing change?:

Clarifies how conflicting matches should be resolved in non-HTTP routes

/cc @hbagdi @youngnick

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 23, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: robscott

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

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 23, 2021
@robscott robscott force-pushed the route-conflicts branch 2 times, most recently from 48ac6c8 to 517732b Compare April 23, 2021 21:24
@robscott robscott force-pushed the route-conflicts branch 2 times, most recently from 94dec5a to f0b7e24 Compare April 27, 2021 22:54
@youngnick
Copy link
Contributor

I think changing "should match a maximum of one route rule" to "MUST match a maximum of one route rule" is vital. But apart from that, this looks great.

// request matches multiple rules, matching precedence MUST be determined in
// order of the following criteria, continuing on ties:
//
// * The longest matching SNI.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to comment on how to compare wildcard strings?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. I think "longest matching" would still be what we want even if wildcards were involved. We were missing guidance for what should be done if "*.example.com" and "b.example.com" both match - I added a new line item below this to clarify that precedence should be given to the longest precise match in the event of a tie.

@bowei
Copy link
Contributor

bowei commented Apr 27, 2021

Nits aside

LGTM

@k8s-ci-robot k8s-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 Apr 28, 2021
@robscott
Copy link
Member Author

Thanks for the great feedback on this @bowei, @hbagdi, and @youngnick! I think I've resolved everything, PTAL.

@bowei
Copy link
Contributor

bowei commented Apr 28, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 28, 2021
@k8s-ci-robot k8s-ci-robot merged commit fbb5adb into kubernetes-sigs:master Apr 28, 2021
@robscott robscott deleted the route-conflicts branch January 8, 2022 01:03
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", 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.

5 participants