-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(nlb): add eip auto selection support for nlb #4317
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
base: main
Are you sure you want to change the base?
feat(nlb): add eip auto selection support for nlb #4317
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aschaber1 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @aschaber1! |
Hi @aschaber1. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
Name: awssdk.String("domain"), | ||
Values: []string{"vpc"}, | ||
}) | ||
addresses, err := t.ec2Client.DescribeAddressesAsList(context.Background(), &ec2.DescribeAddressesInput{ |
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 would be good to have a cache in front of it as I don't expect this result to change often.
example:
aws-load-balancer-controller/pkg/ingress/model_builder.go
Lines 551 to 556 in 644c4b3
type webACLNameToArnMapper struct { | |
wafv2Client services.WAFv2 | |
cache *cache.Expiring | |
cacheTTL time.Duration | |
cacheMutex sync.RWMutex | |
} |
Issue
This pull request introduces a new annotation,
service.beta.kubernetes.io/aws-load-balancer-eip-tags
, allowing users to dynamically assign Elastic IPs (EIPs) to an internet-facing Network Load Balancer (NLB) based on their AWS tags.We don't want to hardcode certain IP allocations, and unfortunately the NLB does not support selecting IPs directly from an IPAMPool.
Description
This change adds a new annotation,
service.beta.kubernetes.io/aws-load-balancer-eip-tags
, that enables selecting unassociated EIPs for an internet-facing NLB by their tags instead of their specific allocation IDs. This simplifies the process for users who manage many EIPs, as they no longer need to manually find and specify individual allocation IDs.The annotation's value is a comma-separated list of
key=value
pairs, which the controller uses to filter available EIPs. It finds all unassociated EIPs that match all specified tags. The controller then assigns these EIPs to the NLB, ensuring there are enough matching EIPs for the number of subnets the NLB is deployed in. This new annotation provides a more flexible way to manage and assign static IPs to NLBs.This functionality complements the existing
service.beta.kubernetes.io/aws-load-balancer-eip-allocations
annotation, offering an alternative for EIP management.Checklist
README.md
, or thedocs
directory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯