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

Define Default Gateway/Route Association Behavior #84

Closed
danehans opened this issue Feb 13, 2020 · 8 comments
Closed

Define Default Gateway/Route Association Behavior #84

danehans opened this issue Feb 13, 2020 · 8 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@danehans
Copy link
Contributor

What would you like to be added:
Document gateway/route association. Should the default approach be open or closed?

Why is this needed:
Define the route field of the gateway resource. Should routes a) be associated to a gateway by default and use gateway.spec.routes as a filtering mechanism (default open) or b) not be associated to a gateway unless specified by gateway.spec.routes (default closed)? Default open provides ease-of-use, but may cause inadvertent route association. Default closed is more secure but requires additional coordination between cluster operator and developers.

/cc @bowei @jpeach @ironcladlou @Miciah

xref: #71

@danehans danehans added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 13, 2020
@Miciah
Copy link
Contributor

Miciah commented Feb 13, 2020

This question is closely related to #12 (using label selectors to associate routes with gateways). Label selectors feel natural and appropriate but may be incompatible with extremely fine-grained, explicit access control (how do you restrict who can apply a label to a resource?).

@bowei
Copy link
Contributor

bowei commented Feb 13, 2020

I think we need both really.

Union type of explicit reference OR selector.
Gateway admin who wants to keep control will only use explicit references.
Gateway admin who wants to let their users chose can add a selector.

The real phase transition in complexity is to allow for some sort of selection at all.
My feeling right now is, let's pull it in and work with it to see what the consequences are.

@jpeach
Copy link
Contributor

jpeach commented Feb 14, 2020

Should routes a) be associated to a gateway by default and use gateway.spec.routes as a filtering mechanism (default open)

If there are multiple gateways, how would you know which routes go with which gateway?

b) not be associated to a gateway unless specified by gateway.spec.routes (default closed)?

Hugely +1 on this. Association with a gateway could mean getting traffic from the internets or getting a service provider bill.

@Miciah
Copy link
Contributor

Miciah commented Feb 14, 2020

If there are multiple gateways, how would you know which routes go with which gateway?

The route's status indicates with which gateways it is associated.

Association with a gateway could mean getting traffic from the internets or getting a service provider bill.

That is an interesting point. Does the API need a way to specify quotas? Which persona should be limits? Could this fall under traffic splitting or route rules? This seems like a new use-case.

@jpeach
Copy link
Contributor

jpeach commented Feb 14, 2020

If there are multiple gateways, how would you know which routes go with which gateway?

The route's status indicates with which gateways it is associated.

But how do you know which gateway it should go with? Would all gateways just pick up all routes? If a route was already bound to gateway A, should gateway B pick it up implicitly?

Does the API need a way to specify quotas? Which persona should be limits? Could this fall under traffic splitting or route rules? This seems like a new use-case.

No, I don't think so. That's what GatewayClass is for. GatewayClass can mean "the internet-facing one", "the expensive one with guaranteed capacity", or whatever is needed.

@bowei
Copy link
Contributor

bowei commented Feb 14, 2020

I think general take is that Gateways should not pick up routes unless it was explicitly configured it to do so to avoid wide open defaults.

Also, need to note that there are several levels of ACLs here:

  • ones applied to the controller service account.
  • ones implemented inside the controller, subject to conformance testing.

@bowei
Copy link
Contributor

bowei commented Apr 2, 2020

/close

This is now documented in the route selection behavior in the code. It may still change due to discussion, but is now explicitly specified:
https://github.com/kubernetes-sigs/service-apis/blob/master/api/v1alpha1/gateway_types.go

@k8s-ci-robot
Copy link
Contributor

@bowei: Closing this issue.

In response to this:

/close

This is now documented in the route selection behavior in the code. It may still change due to discussion, but is now explicitly specified:
https://github.com/kubernetes-sigs/service-apis/blob/master/api/v1alpha1/gateway_types.go

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.

jaison-tiu pushed a commit to jaison-tiu/gateway-api that referenced this issue Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

5 participants