-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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 commentThe 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 |
||
Values: []string{header.Value}, | ||
}, | ||
}, | ||
} | ||
|
@@ -146,15 +147,14 @@ func buildGrpcRouteRuleConditions(matches RouteRule) ([][]elbv2model.RuleConditi | |
return conditions, nil | ||
} | ||
|
||
// BuildHttpRuleActionsBasedOnFilter only request redirect is supported, header modification is limited due to ALB support level. | ||
func BuildHttpRuleActionsBasedOnFilter(filters []gwv1.HTTPRouteFilter) ([]elbv2model.Action, error) { | ||
for _, filter := range filters { | ||
switch filter.Type { | ||
case gwv1.HTTPRouteFilterRequestHeaderModifier: | ||
// TODO: decide behavior for request header modifier | ||
case gwv1.HTTPRouteFilterRequestRedirect: | ||
return buildHttpRedirectAction(filter.RequestRedirect) | ||
case gwv1.HTTPRouteFilterResponseHeaderModifier: | ||
// TODO: decide behavior for response header modifier | ||
default: | ||
return nil, errors.Errorf("Unsupported filter type: %v. Only request redirect is supported. To specify header modification, please configure it through LoadBalancerConfiguration.", filter.Type) | ||
shuqz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
return nil, nil | ||
|
Uh oh!
There was an error while loading. Please reload this page.