feat(nlb): add eip auto selection support for nlb #4317
+80
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?! 🤯