Skip to content

Conversation

@wweiwei-li
Copy link
Collaborator

Description

Test Files:

  • globalaccelerator_suite_test.go - Test suite setup, checks commercial partition requirement
  • service_endpoint_test.go - Service endpoint tests
  • ingress_endpoint_test.go - Ingress endpoint tests
  • multi_endpoint_test.go - Multiple endpoint types
  • gateway_endpoint_test.go - TODO

Helper Files:

  • resource_stack.go - ResourceStack for deploying/cleaning up aga + endpoints
  • aga_verifier.go - Verification types & functions for AWS GlobalAccelerator configuration
  • test_helpers.go - Traffic flow verification

Tests coverred:

Service Endpoint Tests (service_endpoint_test.go):

  • ✅ IP target type lifecycle - Create, verify, update (client affinity), verify traffic
  • ✅ Instance target type scheme change - Deploy with internet-facing, change to internal, verify endpoint replacement

Ingress Endpoint Tests (ingress_endpoint_test.go):

  • ✅ Basic Ingress lifecycle - Create, verify configuration, traffic flow
  • ✅ Auto-discovery - Automatically discover protocol and ports from Ingress

Multi-Endpoint Tests (multi_endpoint_test.go):

  • ✅ Service + Ingress endpoints - Multiple endpoint types in same namespace
  • ✅ Port overrides- Configure port overrides for listeners

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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wweiwei-li

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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 Dec 4, 2025
}

func (m *defaultInstallationManager) UpgradeController(controllerImage string, enableEndPointSlices bool, enableALBTargetControlAgent bool) error {
func (m *defaultInstallationManager) UpgradeController(controllerImage string, enableEndPointSlices bool, enableALBTargetControlAgent bool, enableGlobalAcceleratorController bool) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We also need to set EnableRGTAPI feature for GlobalAcceleratorController.

tf, err = framework.InitFramework()
Expect(err).NotTo(HaveOccurred())

if !isCommercialPartition(tf.Options.AWSRegion) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

May be we can reuse this IsGlobalAcceleratorControllerEnabled in utility function instead of just checking the partition? Or you can create this in utils and we could avoid duplication partition check done here in IsGlobalAcceleratorControllerEnabled

ctx = context.Background()
if tf.Options.ControllerImage != "" {
By("upgrade controller with GlobalAccelerator enabled", func() {
err := tf.CTRLInstallationManager.UpgradeController(tf.Options.ControllerImage, false, false, false)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to set AGA flag to true if we are using custom image for these tests? tf.CTRLInstallationManager.UpgradeController(tf.Options.ControllerImage, false, false, true) ?

})

By("verifying GlobalAccelerator status fields", func() {
gaARN := agaStack.GetGlobalAcceleratorARN()
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can create a function for this verification as we are repeating this in all tests.

@k8s-ci-robot
Copy link
Contributor

@wweiwei-li: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-aws-load-balancer-controller-e2e-test 3808a8d link true /test pull-aws-load-balancer-controller-e2e-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@wweiwei-li wweiwei-li changed the title Add basic aga controller e2e tests Add basic aga controller e2e tests (WIP) Dec 5, 2025
if len(listener.PortRanges) != len(expectedListener.PortRanges) {
return fmt.Errorf("listener[%d] port range count mismatch: expected %d, got %d", i, len(expectedListener.PortRanges), len(listener.PortRanges))
}
for j, expectedPortRange := range expectedListener.PortRanges {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to sort these before we validate these so that we validate these irrespective of order in both ranges?

{FromPort: 80, ToPort: 80},
{FromPort: 443, ToPort: 443},
},
ClientAffinity: string(types.ClientAffinityNone),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing EndpointGroupExpectation

},
Spec: agav1beta1.GlobalAcceleratorSpec{
Name: &acceleratorName,
IPAddressType: agav1beta1.IPAddressTypeIPV4,
Copy link
Collaborator

Choose a reason for hiding this comment

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

For auto-discovery case, you can also skip IPAddressType, ClientAffinity and TrafficDialPercentage. These should all be defaulted through CRD if unspsecified. We could check that as well.

PortRanges: []PortRangeExpectation{
{FromPort: 80, ToPort: 80},
},
ClientAffinity: string(types.ClientAffinityNone),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same EndpointGroupExpectation is missing

},
}

ingStack = ingress.NewResourceStack([]*appsv1.Deployment{deployment}, []*corev1.Service{nlbSvc, nodeSvc}, []*networkingv1.Ingress{ing})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of making deploying NLB through ingress stack, shall we deploy it standalone?


// ResourceStack orchestrates the deployment of endpoint resources with GlobalAccelerator
type ResourceStack struct {
endpointStack EndpointStack // Endpoint resources (Service/Ingress/Gateway)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this an array for multi-endpoint stacks?

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.

3 participants