-
Notifications
You must be signed in to change notification settings - Fork 263
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
Add reference grant to support httprouting for different namespace #347
Conversation
} | ||
|
||
func (m *ModelRouter) createReferenceGrant(name, namespace string) { | ||
referenceGrant := gatewayv1beta1.ReferenceGrant{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
httproute will be created in aibrix namespace where gateway class is that where httproute object needs to. Service backend ref is in different namespace, hence the need to create reference grant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
em. httproute has to be created in aibrix-system? we did create it in separate namespace right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
previously I was using deployment namespace for httproute but all the local testing was based on the deployment in the aibrix-system. httproute need to be in namespace as gateway class to be accepted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I point was If we add a namespace reference in gateway, it is supposed to work, right? I did workaround in downstream. can you check it? We should separate the control plane and data plane.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For httproute to be accepted, there are two conditions. 1) httproute and gateway need to be in same namespace and 2) is httproute and backend service are in different namespace then a reference grant is needed.
Error if httproute and gateway are in different namespace.
Error if httproute and backend service are in different namespace and no reference grant is present.
8fc89ed
to
d87606e
Compare
Add support for cross-namespace routing: #336