Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for capacity unit reservation for load balancers #3950

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

shraddhabang
Copy link
Collaborator

Description

Application Load Balancer (ALB) and Network Load Balancer (NLB) now support Load Balancer Capacity Unit (LCU) Reservation that allows you to proactively set a minimum capacity for your load balancer, complementing its existing ability to auto-scale based on your traffic pattern. Ref : https://aws.amazon.com/about-aws/whats-new/2024/11/load-balancer-capacity-unit-reservation-application-balancers/

Adding support for this feature on controller for Ingress and Services.

Customer Experience

End user will need to update the controller to the latest version containing this feature. They will also need to update the IAM policies and IngressClassParam CRDs after updating the controller version to use this feature.

Default mode

If the alb.ingress.kubernetes.io/minimum-load-balancer-capacity or service.beta.kubernetes.io/aws-load-balancer-minimum-load-balancer-capacity annotations are not specified for the ingress or service in the manifest, the capacity will be set to zero on the new load balancers by default.

Update capacity :

If the end user wants to update the capacity for ALB/NLB to 1200 capacity units, they can update it by setting the new annotation as follows

Sets the minimum capacity for the ALB

alb.ingress.kubernetes.io/minimum-load-balancer-capacity: CapacityUnits=1200

Sets the minimum capacity for the NLB

service.beta.kubernetes.io/aws-load-balancer-minimum-load-balancer-capacity: CapacityUnits=1200

Reset capacity:

If the end user wants to reset the capacity back to 0, they can either remove the new annotations or they can set the capacity on the annotations to be zero as follows

Sets the minimum capacity for the ALB

alb.ingress.kubernetes.io/minimum-load-balancer-capacity: CapacityUnits=0

Sets the minimum capacity for the NLB

service.beta.kubernetes.io/aws-load-balancer-minimum-load-balancer-capacity: CapacityUnits=0

Turn off feature flag for capacity reservation (New)

If the customer wants to disable this feature to avoid accidental capacity reservation, then they can turn this feature off through the controller flag by updating their controller deployment as follows

      containers:
      - args:
        - --cluster-name=my-cluster
        - --ingress-class=alb
        - --log-level=debug
        - --feature-gates=LBCapacityReservation=false
        image: public.ecr.aws/eks/aws-load-balancer-controller:v2.10.0
        imagePullPolicy: IfNotPresent

Increase the stabilization requeue interval(New)

If the customer wants to increase the interval to monitor the LB status, then they can set through the controller flag by updating their controller deployment as follows

      containers:
      - args:
        - --cluster-name=my-cluster
        - --ingress-class=alb
        - --log-level=debug
        - --lb-stabilization-requeue-interval=1000s
        image: public.ecr.aws/eks/aws-load-balancer-controller:v2.10.0
        imagePullPolicy: IfNotPresent

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • [x ] Manually tested
  • [x ] 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 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. labels Nov 21, 2024
@shraddhabang shraddhabang changed the title Pcgafeature Add support for capacity unit reservation for load balancers Nov 21, 2024
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since migration of GO SDK to V2, we dont need to generate the private SDK from model anymore. You can simple download the generated GoV2 SDK code and replace references directly.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 22, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 4, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

@shraddhabang shraddhabang merged commit 616e39b into kubernetes-sigs:main Dec 6, 2024
8 of 9 checks passed
shihtiy-tw added a commit to shihtiy-tw/eks-lab that referenced this pull request Dec 11, 2024
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. 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.

4 participants