-
Notifications
You must be signed in to change notification settings - Fork 743
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
feat(gateway-api): Add custom backendRef and filters support for HTTPRoute #1742
base: main
Are you sure you want to change the base?
Conversation
b711e6d
to
df378db
Compare
f89feb6
to
5931ff6
Compare
5931ff6
to
3cd52c0
Compare
…Route Signed-off-by: kahirokunn <[email protected]>
3cd52c0
to
4f3511b
Compare
Dear @stefanprodan I hope this message finds you well. I am reaching out to request your review on an enhancement I am working on for the Flagger gateway API. My goal is to support the integration of Envoy Gateway with KEDA HTTPScaledObjects through this enhancement. I would greatly appreciate your feedback and insights on this matter. Thank you for your time and consideration. Best regards, |
Signed-off-by: kahirokunn <[email protected]>
thank you for this PR @kahirokunn! have you tested how this change behaves when performing a canary rollout with session affinity enabled? that code also makes use of backend specific filters, so its important to verify that any userland configuration will not break that feature. |
CustomMetadata | ||
|
||
// Ref references a Kubernetes object. | ||
BackendObjectReference *v1.BackendObjectReference `json:"backendRef,omitempty"` |
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.
lets avoid adding this in the same place as kubernetes service configuration (CustomMetadata
). BackendObjectReference
and Filters
fall under a different abstraction.
my suggestion would be to add two fields to CanaryService
, PrimaryHTTPBackendRef
and CanaryHTTPBackendRef
both of type v1.HTTPBackendRef
.
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.
Thank you for your helpful suggestion. I will make the changes accordingly by introducing two new fields, PrimaryHTTPBackendRef and CanaryHTTPBackendRef, both of type v1.HTTPBackendRef, ensuring that they reside in the correct abstraction layer. Please let me know if there is anything else I can improve or clarify.
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.
@aryan9600 Thank you for the suggestion. However, when using v1.HTTPBackendRef
, we are required to provide a name even if we only want to customize the filters, since the name field in BackendObjectReference is not optional. We feel this may not be the most optimal interface design, which is why we initially split backendRef and filters in our PR. What are your thoughts on addressing this concern?
Thank you so much for your feedback regarding session affinity! I will do my best to verify that these changes won’t break any existing session affinity behavior. However, to avoid any misunderstanding or missing test scenarios, would you mind sharing a bit more detail on the specific cases or concerns you have in mind about backend-specific filters and userland configurations? Your insights would be really helpful, and I appreciate your cooperation. |
Description
This PR adds support for custom backend references in Flagger's primary and canary services. This enhancement allows users to specify different routing configurations and intermediate services for primary and canary traffic, enabling more complex deployment patterns and better integration with existing infrastructure.
Key Changes
backendRef
andfilters
tospec.service.canary
andspec.service.primary
Use Cases
This feature enables several important scenarios:
Example Configuration
Breaking Changes
None. This is a backward-compatible change that maintains existing behavior when custom backend references are not specified.
Additional Context
This change also allows for cases where different backends are referenced for canary and primary, as shown in the attached image.
For details, please refer to the following PR.
#1714
Issue
#1741
TODO