Skip to content

Conversation

@zac-nixon
Copy link
Collaborator

Issue

Description

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 18, 2025
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 18, 2025
@zac-nixon zac-nixon force-pushed the znixon/gw-tg-creation branch from 7379608 to 132e5a3 Compare April 21, 2025 16:56
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 21, 2025
@zac-nixon zac-nixon force-pushed the znixon/gw-tg-creation branch from 132e5a3 to 75892c3 Compare April 21, 2025 16:57
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 21, 2025
// enableProxyProtocolV2 [Network LoadBalancers] Indicates whether proxy protocol version 2 is enabled.
// By default, proxy protocol is disabled.
// +optional
EnableProxyProtocolV2 *bool `json:"enableProxyProtocolV2,omitempty"`
Copy link
Collaborator

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.

Copy link
Collaborator Author

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 {
Copy link
Collaborator

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.
Copy link
Collaborator

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?

Copy link
Collaborator Author

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 {
Copy link
Collaborator

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.

Copy link
Collaborator Author

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?
Copy link
Collaborator

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.

@shraddhabang
Copy link
Collaborator

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 21, 2025
@k8s-ci-robot
Copy link
Contributor

[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:
  • OWNERS [shraddhabang,zac-nixon]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@shraddhabang shraddhabang added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Apr 21, 2025
@k8s-ci-robot k8s-ci-robot merged commit 12eefb6 into kubernetes-sigs:main Apr 22, 2025
9 checks passed
zac-nixon added a commit to zac-nixon/aws-load-balancer-controller that referenced this pull request Apr 22, 2025
…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
niclask25 pushed a commit to niclask25/aws-load-balancer-controller that referenced this pull request Apr 22, 2025
…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
zac-nixon added a commit to zac-nixon/aws-load-balancer-controller that referenced this pull request Apr 29, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

3 participants