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 HTTP and TLS Route status should be populated #859

Merged
merged 1 commit into from
Sep 10, 2021

Conversation

robscott
Copy link
Member

@robscott robscott commented Sep 10, 2021

What type of PR is this?
/kind bug

What this PR does / why we need it:
This fixes the confusing guidance (originally added by me) in HTTP and TLS Routes that suggested that conditions should be populated on Gateway Listeners. I had originally built out conditions that could be populated on Gateway and Listeners, but I'm not sure that's the right approach. I think the simplest and most straightforward answer here is to populate Route status. If Route owners can't attach to a Gateway they want to, they can simply contact the Gateway owner.

Which issue(s) this PR fixes:
Fixes #849

Does this PR introduce a user-facing change?:

Updated guidance on how HTTP and TLS Route status should be populated when hostnames do not match.

/cc @youngnick @howardjohn

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 10, 2021
@k8s-ci-robot
Copy link
Contributor

@robscott: GitHub didn't allow me to request PR reviews from the following users: howardjohn.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

What type of PR is this?
/kind bug

What this PR does / why we need it:
This fixes the confusing guidance in HTTP and TLS Routes that suggested that conditions should be populated on Gateway Listeners. I had originally built out conditions that could be populated on Gateway and Listeners, but I'm not sure that's the right approach. I think the simplest and most straightforward answer here is to populate Route status. If Route owners can't attach to a Gateway they want to, they can simply contact the Gateway owner.

Which issue(s) this PR fixes:
Fixes #849

Does this PR introduce a user-facing change?:

Updated guidance on how HTTP and TLS Route status should be populated when hostnames do not match.

/cc @youngnick @howardjohn

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 10, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: howardjohn, 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

// If hostnames are specified, and none match with the criteria above, then
// the HTTPRoute is not accepted, and the implementation must raise an
// 'Accepted' Condition with a status of `False` in the corresponding
// RouteParentStatus.
Copy link
Contributor

Choose a reason for hiding this comment

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

What if the route specifies two hostnames - one satisfied the above criteria but the other one doesn't?

Copy link
Contributor

Choose a reason for hiding this comment

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

must be at least one intersecting hostname for the HTTPRoute to be

Maybe this line clarifies that?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, that's what I was going for. I also hope that "and none match the criteria" helps convey that only one would need to match.

// If hostnames do not match with the criteria above, then the HTTPRoute is
// not accepted, and the implementation must raise an 'Accepted' Condition
// with a status of `False` for the target Listener(s).
// If hostnames are specified, and none match with the criteria above, then
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// If hostnames are specified, and none match with the criteria above, then
// When hostnames specified in Route and none match with the criteria above, then

Copy link
Member Author

Choose a reason for hiding this comment

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

There's a bit of nuance here, it's really only if hostnames are specified on both the Gateway and Route. If they are absent in either place, everything should match. I'll work on clarifying that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that's what I was trying to capture as well but probably didn't do a good job either.
I was trying to imply gateway's listener hostname with the "criteria above" part of the sentence but that feels indirect as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching this @hbagdi! I've updated the PR to make this more clear, PTAL.

@hbagdi
Copy link
Contributor

hbagdi commented Sep 10, 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 Sep 10, 2021
@k8s-ci-robot k8s-ci-robot merged commit fc94bc2 into kubernetes-sigs:master Sep 10, 2021
robscott added a commit to robscott/gateway-api that referenced this pull request Sep 10, 2021
robscott added a commit to robscott/gateway-api that referenced this pull request Sep 27, 2021
robscott added a commit to robscott/gateway-api that referenced this pull request Sep 27, 2021
@robscott robscott deleted the tls-http-accepted branch January 8, 2022 01:06
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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add top level Gateway conditions when Routes fail to attach
4 participants