-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[feat gw-api] backfill E2E tests #4264
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
Conversation
Protocol: gwv1.HTTPProtocolType, | ||
}, | ||
} | ||
httpr := buildHTTPRouteWithMatchesAndTargetGroupWeights() |
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.
Instead of creating a dedicated func to build HTTP Routes with Matches and TG weights, Can you update the existing buildHTTPRoute
function and send the required Filters and Matches for the rules. That way we can extend the same func to to process different testcases in future. I modified the same func to accept different hostnames we can extend it to accept filters and matches too.
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.
my intentional was to keep them independent since those will not be used in basic httproute tests. especially there are cases that when request redirect cannot be together with backendRefs, instead of handling all those in one function, i felt rather to keep them clean
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.
We could customize the httpRoutes with our without backend refs too if needed later. I think rather than creating dedicated func for each of them it will be easier to keep one buildHTTPRoute func so that we can customize it as much as we want. Then we only need to think about the possible combinations of Filters, Matches to build test cases easily.
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.
ok i can make this change if it is preferred by you. i am fine with both
@@ -98,7 +98,8 @@ func buildHttpHeaderCondition(headers []gwv1.HTTPHeaderMatch) []elbv2model.RuleC | |||
Field: elbv2model.RuleConditionFieldHTTPHeader, | |||
HTTPHeaderConfig: &elbv2model.HTTPHeaderConditionConfig{ | |||
HTTPHeaderName: string(header.Name), | |||
Values: []string{header.Value}, | |||
// for a given HTTPHeaderName, ALB rule can accept a list of values. However, gateway route headers only accept one value per name, and name cannot duplicate. |
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.
Interesting. Are we going to use the rule CRD to enhance this?
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.
actually, that's not discussed yet. i am ok to add it later when customer needs it.
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.
let me know if you want me to add it in rule-CRD, let's discuss it tomorrow
ignore makefile address comments refactor code
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: shuqz, zac-nixon 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 |
/lgtm |
Description
Checklist
README.md
, or thedocs
directory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯