Skip to content

Conversation

@shraddhabang
Copy link
Collaborator

This PR is copy of approved PR #4463 with some refactors.
New commit : [feat aga] addressing feedback for refactoring

This PR introduces comprehensive endpoint group management capabilities for AGA in the AWS Load Balancer Controller. The implementation includes endpoint group reconciliation logic, conflict detection and resolution, and full lifecycle management (creation, updates, and deletion) within the AGA controller.

This PR is divided in multiple commits for easier review. (The earlier PR is not yet merged so please ignore the duplicate commits from the older PR only focus on the following commits for this PR)

Description

[feat aga] Implement model builder for endpoint groups

  • Added the model builder for endpoint groups to build model object for endpoint group management
  • This also includes the validations to detect failures early.

[feat aga] few bugfixes and code refactoring

  • This includes the bug fix for getting the region info from cloud service instead if controller flag. The user may not always set controller flag for regions. So to handle that, we are resolving region of the cluster from cloud svc which use EC2 metadata in absence of configured aws region
  • Refactored some code to include some detailed logging for model build and deploy failures.
  • Found the infinite reconcile loop happening during model deploy failed error as we were setting the message of the status condition for accelerator for each failure which was causing the status to update after each reconcile . Added a fixed message to avoid that.

[feat aga] Implement endpoint group deployer with port override conf

This commit includes two parts.

Endpoint Group Management
  • Added region-based reconciliation to map endpoint groups with their corresponding listeners
  • Implemented three-way reconciliation (update, create, delete) for endpoint groups in synthesizeEndpointGroupsOnListener
  • Enhanced resource matching logic using region as the unique key within listener context
  • Added robust error handling and detailed logging throughout the reconciliation process
Port Override Conflict Resolution
  • Implemented detectConflictsWithSDKEndpointGroups to identify region-specific port conflicts

  • Created two-phase conflict resolution algorithm in ProcessEndpointGroupPortOverrides:

    1. Analysis phase: Collects and evaluates all endpoint groups and potential conflicts
    2. Execution phase: Updates endpoint groups to remove conflicting port overrides
  • Added validation rules ensuring endpoint ports don't overlap with listener port ranges

  • Ensured listener ports in port overrides remain within listener port range specifications

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 Nov 26, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shraddhabang

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:

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

@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 Nov 26, 2025
@shraddhabang
Copy link
Collaborator Author

This PR is copy of approved PR #4463 with some refactors.
This PR was approved by team already. So merging this.

@shraddhabang shraddhabang merged commit 9b0a432 into kubernetes-sigs:main Nov 26, 2025
8 of 9 checks passed
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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants