Skip to content

Conversation

shraddhabang
Copy link
Collaborator

Issue

Fixes #1572

Description

This PR introduces the model builder for AWS Global Accelerator (AGA) resource

Core Model Builder Components:

  • pkg/aga/model_build_accelerator.go - Accelerator model builder with support for:

    • Name generation and validation (63-character limit with sanitization)
    • IP address type configuration (IPv4/DualStack)
    • Static IP address assignment
    • Resource tagging with external managed tags validation
  • pkg/model/aga/accelerator.go - Accelerator model definition

  • pkg/aga/tag_helper.go - Tag management utilities for AGA resources

  • Comprehensive unit testing

Testing

{"level":"info","ts":"2025-10-17T18:05:25Z","logger":"controllers.globalAccelerator","msg":"Reconciling GlobalAccelerator resources","name":"basic-accelerator","namespace":"shrabang-ns"}
{"level":"info","ts":"2025-10-17T18:05:25Z","logger":"controllers.globalAccelerator","msg":"successfully built model","model":"{\"id\":\"shrabang-ns/basic-accelerator\",\"resources\":{\"AWS::GlobalAccelerator::Accelerator\":{\"GlobalAccelerator\":{\"spec\":{\"name\":\"basic-test-accelerator\",\"ipAddresses\":[\"192.0.2.253\"],\"ipAddressType\":\"IPV4\",\"enabled\":true,\"tags\":{\"Environment\":\"test\",\"Team\":\"platform\",\"aga.k8s.aws/resource\":\"GlobalAccelerator\",\"aga.k8s.aws/stack\":\"shrabang-ns/basic-accelerator\",\"elbv2.k8s.aws/cluster\":\"gateway-api\"}}}}}}"}
{"level":"info","ts":"2025-10-17T18:05:25Z","logger":"controllers.globalAccelerator","msg":"Built model successfully","accelerator":"GlobalAccelerator","stackID":"shrabang-ns/basic-accelerator"}

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 Oct 17, 2025
@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 Oct 17, 2025
@shraddhabang shraddhabang force-pushed the agamodelbuilder branch 3 times, most recently from c883bb6 to 4c01b60 Compare October 17, 2025 20:42
// ResourceIDAccelerator is the resource ID for Global Accelerator resources
ResourceIDAccelerator = "GlobalAccelerator"

// ResourceTypeAccelerator is the CloudFormation resource type for Global Accelerator
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's wise to re-use this as it's two different IaC systems

}
}

func (b *defaultAcceleratorBuilder) buildAcceleratorTags(_ context.Context, stack core.Stack, ga *agaapi.GlobalAccelerator) (map[string]string, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something we can generalize? This looks similar to the Gateway tag helper.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shraddhabang, zac-nixon

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:
  • OWNERS [shraddhabang,zac-nixon]

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

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.

[Feature Request] Global LoadBalancer support

3 participants