gateway-api icon indicating copy to clipboard operation
gateway-api copied to clipboard

Adding GEP-995 for support for named route rules

Open guicassolato opened this issue 2 years ago • 11 comments

What type of PR is this? /kind gep /kind api-change

What this PR does / why we need it: Proposal to add a new name field to the route rule types (GRPCRouteRule, HTTPRouteRule, TCPRouteRule, TLSRouteRule and UDPRouteRule) to support referencing individual rules by name.

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

Does this PR introduce a user-facing change?:

Add a new `name` field to the route rule types GRPCRouteRule, HTTPRouteRule, TCPRouteRule, TLSRouteRule, and UDPRouteRule.

guicassolato avatar Nov 17 '23 17:11 guicassolato

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: guicassolato / name: Guilherme Cassolato (8cc68aabf5ea434ea59789fb524565b31843868d, a0b509f7eb1b62d0368233a9449f0315f6476b64, 1ae71e53f6b4b12574f553d2fbfbf19e58fcc00f, 4c27b7cb7203b86fb93c0966f750b8e068359608, 47e48794100242e517b00b68ea833b9885e3ee92, 11330d83d35c2c2d70846b67ed6e2d46943b5353)

Welcome @guicassolato!

It looks like this is your first PR to kubernetes-sigs/gateway-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/gateway-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Nov 17 '23 17:11 k8s-ci-robot

Hi @guicassolato. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 avatar Nov 17 '23 17:11 k8s-ci-robot

Can we please get some preliminary feedback on this (Goals/Non-goals, especially), so we can try moving on with the actual proposal?

Maybe @youngnick and/or @robscott please? 🙏 (If you have the time for it. I know you're usually very busy.)

guicassolato avatar Nov 28 '23 12:11 guicassolato

@guicassolato, thanks for putting this together! I'm going to try to pay more attention to it, as we're finding a use case for this in Linkerd, too.

One questions for you that's not in the draft GEP -- are you thinking that must names be unique?

kflynn avatar Dec 01 '23 17:12 kflynn

One questions for you that's not in the draft GEP -- are you thinking that must names be unique?

Good question, @kflynn!

I think unique names make sense for selecting individual referents. For selecting more than one referent, the reference should list all the names.

You definitely lose the possibility of using the field for grouping. On the other hand, any reference becomes unambiguous, which I think is a good thing.

It's also neat for observability; if you log/trace a rule-related event by name, you know exactly which rule the event is related to. (For similar reason, I believe unique names also serves well to Istio's use case, which IIRC included possibly some 1:1 mapping to internal objects, today based strictly on index.)

In contrast, an alternative could be something like labels. They also work for selecting and have the extra benefit of serving as well for grouping. However, they are likely not as neat as a simple and straightforward unique name for referencing, and tracing can get messy.

Finally, among all these options (unique names, homonymous referents, and labels), I believe unique names is the more restrictive one and therefore the best start. It's easier to evolve from this to something more permissive in the future if needed, than the opposite.

guicassolato avatar Dec 01 '23 21:12 guicassolato

Is there any update on this PR? IMHO, many people like us need the new name filed in the xRoute.

spacewander avatar Dec 19 '23 12:12 spacewander

Is there any update on this PR?

There was no objection regarding the goals/non-goals for a couple of weeks, so I've pushed the proposal for the API changes. Now, it needs review.

guicassolato avatar Dec 19 '23 13:12 guicassolato

@kflynn @robscott @howardjohn @hzxuzhonghu This GEP targets https://github.com/kubernetes-sigs/gateway-api/issues/995. Would you take a look at it? Thanks!

spacewander avatar Dec 20 '23 05:12 spacewander

Thanks for the suggestions @mikemorris! I'm officially back from holidays tomorrow and I'll make the changes to the PR.

guicassolato avatar Jan 03 '24 15:01 guicassolato

/ok-to-test /approve

youngnick avatar Apr 05 '24 00:04 youngnick

Sorry we've taken so long to get to this @guicassolato! I think this has been very well written, and given our recent discussions at KubeCon about this, I think we're overdue to get this in. With that said, I think we're realistically a bit too late to hit the v1.1 cut, but hopefully this can be one of the first features included in v1.2.

/lgtm /approve

robscott avatar Apr 05 '24 00:04 robscott

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guicassolato, mikemorris, robscott, youngnick

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:
  • ~~OWNERS~~ [robscott,youngnick]

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 avatar Apr 05 '24 00:04 k8s-ci-robot

Thanks for approving the PR, guys! 🙏 There's still a do-not-merge/hold label which needs to be removed I imagine, but happy to start working on the actual change myself as soon it happens... now targeting v1.2.

guicassolato avatar Apr 05 '24 09:04 guicassolato

Since we've got approvals from a couple maintainers on this I think we're good to remove the hold.

/hold cancel

robscott avatar Apr 05 '24 23:04 robscott