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

gamma: drop provision to omit backendRef #2031

Merged

Conversation

howardjohn
Copy link
Contributor

What type of PR is this?

/kind gep

What this PR does / why we need it:
IMO, this does not make sense as SHOULD. It should be a MUST or not in the spec.

I have proposed removal for the following reasons:

  • Inconsistent with Gateway parent ref (which also means you cannot possibly have a service parent and gateway parent)
  • Limits ability to have non-Service parents, as it implies the frontend and backend are the same object

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/gep PRs related to Gateway Enhancement Proposal(GEP) cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 17, 2023
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 17, 2023
@howardjohn
Copy link
Contributor Author

@michaelbeaumont
Copy link
Contributor

### Ports
By default, a `Service` attachment applies to all ports in the service. Users may want to attach routes to only a *specific* port in a Service. To do so, the `parentRef.port` field should be used.
If `port` is set, the implementation MUST associate the route only with that port.
If `port` is not set, the implementation MUST associate the route with all ports defined in the Service.

Doesn't requiring backendRefs make the "all ports" option significantly less useful? Or is there a use case to direct multiple frontend ports to the same backend port?

@howardjohn
Copy link
Contributor Author

Doesn't requiring backendRefs make the "all ports" option significantly less useful? Or is there a use case to direct multiple frontend ports to the same backend port?

I would say yes, and I think that is the most compelling reason to keep it if we do. But I would note this is a fairly narrow UX optimization; once they start using a different backend (example - canary) then they lose this enhancement. It seems a like a possible foot-gun that to change the backend from svc to svc-v1=50%, svc-v2=50% I need to change the parentRef and backendRef, for example.

@michaelbeaumont
Copy link
Contributor

Doesn't requiring backendRefs make the "all ports" option significantly less useful? Or is there a use case to direct multiple frontend ports to the same backend port?

I would say yes, and I think that is the most compelling reason to keep it if we do. But I would note this is a fairly narrow UX optimization; once they start using a different backend (example - canary) then they lose this enhancement. It seems a like a possible foot-gun that to change the backend from svc to svc-v1=50%, svc-v2=50% I need to change the parentRef and backendRef, for example.

👍 can we drop the optional port for Service parentRefs if we drop optional backendRefs? Then ideally "missing port & kind: Service" in a parentRef would be rejected by the webhook.

But the status quo of optional parentRef port and optional backendRefs works for me.

@robscott
Copy link
Member

@howardjohn I think if we do remove this we should clearly note why it was removed and provide very clear guidance for how the situation should (or must) be handled. Removing the "SHOULD" without actually leaving any guidance for how to handle this case could result in more confusion and inconsistency across providers.

@howardjohn
Copy link
Contributor Author

howardjohn commented May 17, 2023 via email

Copy link
Contributor

@michaelbeaumont michaelbeaumont left a comment

Choose a reason for hiding this comment

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

LGTM other than line 96

IMO, this does not make sense as SHOULD. It should be a MUST or not in
the spec.

I have proposed removal for the following reasons:
* Inconsistent with Gateway parent ref (which also means you cannot
  possibly have a service parent and gateway parent)
* Limits ability to have non-Service parents, as it implies the frontend
  and backend are the same object
@howardjohn howardjohn force-pushed the gamma/drop-omit-backendref branch from a8826b8 to 41fa159 Compare June 6, 2023 17:29
@howardjohn
Copy link
Contributor Author

Add back removed line and explained this was removed

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 6, 2023
@robscott
Copy link
Member

robscott commented Jun 6, 2023

Thanks @howardjohn! Based on discussion in GAMMA meeting today and approvals above, I think we've got consensus here.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 6, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: howardjohn, keithmattix, michaelbeaumont, 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 6, 2023
@k8s-ci-robot k8s-ci-robot merged commit e77b50d into kubernetes-sigs:main Jun 6, 2023
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/gep PRs related to Gateway Enhancement Proposal(GEP) lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Development

Successfully merging this pull request may close these issues.

5 participants