Skip to content

feat(service): add EIP allocation discovery by tags - #4875

Draft
a7i wants to merge 1 commit into
kubernetes-sigs:mainfrom
a7i:feat/eip-allocations-discovery-tags
Draft

feat(service): add EIP allocation discovery by tags#4875
a7i wants to merge 1 commit into
kubernetes-sigs:mainfrom
a7i:feat/eip-allocations-discovery-tags

Conversation

@a7i

@a7i a7i commented Aug 7, 2026

Copy link
Copy Markdown

Issue

#4874

Description

Adds service.beta.kubernetes.io/aws-load-balancer-eip-allocations-discovery-tags for internet-facing NLB services. The controller discovers VPC-scoped Elastic IP allocation IDs via EC2 tag filters and matches them to resolved subnets by Availability Zone.

  • New EIPResolver in pkg/networking using ec2:DescribeAddresses
  • Mutually exclusive with aws-load-balancer-eip-allocations
  • Rejects EIPs associated with non-NLB resources
  • Allows EIPs already associated with NLB (amazon-elb owner) for stable updates

Example:

service.beta.kubernetes.io/aws-load-balancer-eip-allocations-discovery-tags: pod=pod998,service=zorg,visibility=external

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

Made with Cursor

Allow internet-facing NLB services to discover Elastic IP allocation IDs
via EC2 tags instead of hardcoding eip-allocations in manifests.
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 7, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from shraddhabang and shuqz August 7, 2026 22:14
@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 7, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: a7i / name: Amir Alavi (00c019c)

@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: a7i
Once this PR has been reviewed and has the lgtm label, please assign shuqz for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

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

@kubernetes-prow kubernetes-prow Bot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 7, 2026
@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 59.40594% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.52%. Comparing base (057c70f) to head (00c019c).
⚠️ Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
pkg/networking/eip_resolver_mocks.go 0.00% 15 Missing ⚠️
pkg/aws/services/ec2_mocks.go 0.00% 9 Missing ⚠️
pkg/aws/services/ec2.go 0.00% 8 Missing ⚠️
pkg/networking/eip_resolver.go 92.15% 2 Missing and 2 partials ⚠️
pkg/service/model_build_load_balancer.go 73.33% 2 Missing and 2 partials ⚠️
controllers/service/service_controller.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4875      +/-   ##
==========================================
+ Coverage   57.49%   57.52%   +0.03%     
==========================================
  Files         396      398       +2     
  Lines       31621    31771     +150     
==========================================
+ Hits        18179    18276      +97     
- Misses      12384    12433      +49     
- Partials     1058     1062       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@a7i
a7i force-pushed the feat/eip-allocations-discovery-tags branch from 62dd1cf to 00c019c Compare August 7, 2026 23:51
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants