Skip to content
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

Improve targetgroup.elbv2 target discovery #2355

Open
michaelvl opened this issue Feb 24, 2025 · 0 comments
Open

Improve targetgroup.elbv2 target discovery #2355

michaelvl opened this issue Feb 24, 2025 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. service/elbv2 Indicates issues or PRs that are related to elbv2-controller.

Comments

@michaelvl
Copy link

michaelvl commented Feb 24, 2025

Is your feature request related to a problem?

When creating ALBs and thus TargetGroup resources I want to let the TargetGroup refer to Kubernetes Pods. Since Kubernetes Pods typically are dynamically created, I do not want to manually specify Pod IPs in the TargetGroup. Instead I would prefer something similar to how the aws-load-balancer controller does it using the TargetGroupBinding feature, which allow updating an AWS targetgroup based on Kubernetes Endpoints/Service resources.

See e.g. https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.1/guide/targetgroupbinding/targetgroupbinding/

A side note: Using the elbv2 controllers TargetGroup with an empty targets list and the aws-load-balancer controllers TargetGroupBinding does not work as the former removes targets added by the latter.

I see two architectural options here:

  1. Keep the elbv2 controller as-is with 'plain' target definitions and use another controller for creating/updating the TargetGroup when Kubernetes Endpoints change.
  2. Add a target lookup to the TargetGroup definition, i.e. conceptually include the aws-load-balancer controller feature in the e;bv2 controller.

The former keeps the elbv2 controller simpler but adds the need for another controller. The latter makes the elbv2 controller more 'self-contained' as it includes the target resolution but it means that the elbv2 controller becomes dependent on a non-AWS specific Endpoints resource.

@michaelhtm michaelhtm added kind/feature Categorizes issue or PR as related to a new feature. service/elbv2 Indicates issues or PRs that are related to elbv2-controller. labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. service/elbv2 Indicates issues or PRs that are related to elbv2-controller.
Projects
None yet
Development

No branches or pull requests

2 participants