-   Notifications  
You must be signed in to change notification settings  - Fork 1.6k
 
[feat: gw-api] Creating Target Group + TGB from Gateway spec #4150
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: gw-api] Creating Target Group + TGB from Gateway spec #4150
Conversation
7379608 to 132e5a3   Compare   132e5a3 to 75892c3   Compare   | // enableProxyProtocolV2 [Network LoadBalancers] Indicates whether proxy protocol version 2 is enabled. | ||
| // By default, proxy protocol is disabled. | ||
| // +optional | ||
| EnableProxyProtocolV2 *bool `json:"enableProxyProtocolV2,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 infer this from the attributes value instead of creating a dedicated field.
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.
Makes sense.
| return output, nil | ||
| } | ||
|   |  ||
| func (builder *targetGroupBuilderImpl) getTargetProps(routeDescriptor routeutils.RouteDescriptor, backend routeutils.Backend) *elbv2gw.TargetGroupProps { | 
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.
NIT: getTargetGroupProps
| // TODO, auto infer? | ||
| if targetGroupProps == nil || targetGroupProps.Protocol == nil { | ||
| // infer this somehow!? | ||
| // use the backend config to get the protocol type. | 
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.
This should be based on its route right instead of backend config?
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 think it depends. For example, there is no way to say that a TargetGroup should use the TCP_UDP protocol just from the route type. I'll add some auto infer using the route, and we can come back in our specific L4 phase to include TCP_UDP support.
| return | ||
| } | ||
|   |  ||
| if _, ok := (*attributeMap)[shared_constants.TGAttributeProxyProtocolV2Enabled]; !ok { | 
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 not add any default values from our side for attributes. We dont want any client side handling of any attribute defaults. This is leftover code from service as they had dedicated annotations for few attributes.
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.
Makes sense.
|   |  ||
| baseBuilder.logger.Info("Got this route details", "routes", routes) | ||
| /* Target Groups */ | ||
| // TODO - Figure out how to map this back to a listener? | 
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 will build listeners after the LB so while building listeners we will be building their corresponding actions on rules(for ALB) and default actions for NLB, we will build their tgs.
|   /lgtm  |  
|   [APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: shraddhabang, 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   |  
…tes-sigs#4150) * [gw api] tg creation * fixes to get tg + tgb working * make logging less noisy * refactor duplicated consts * tg tests * fix interval and timeout to appease alb * use shared constant for health check port * refactor multicluster to target group props * refactor to use route kind enum * infer target group type from route
…tes-sigs#4150) * [gw api] tg creation * fixes to get tg + tgb working * make logging less noisy * refactor duplicated consts * tg tests * fix interval and timeout to appease alb * use shared constant for health check port * refactor multicluster to target group props * refactor to use route kind enum * infer target group type from route
…tes-sigs#4150) * [gw api] tg creation * fixes to get tg + tgb working * make logging less noisy * refactor duplicated consts * tg tests * fix interval and timeout to appease alb * use shared constant for health check port * refactor multicluster to target group props * refactor to use route kind enum * infer target group type from route
Issue
Description
Checklist
README.md, or thedocsdirectory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯