Skip to content

add load balancer attributes support for IngressClassParams #2190

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

Conversation

oliviassss
Copy link
Collaborator

@oliviassss oliviassss commented Aug 23, 2021

Description

This PR adds an optional setting loadBalancerAttributes for IngressClassParams, to specify the ALB attributes to apply for all Ingresses of the IngressClass.

  • If loadBalancerAttributes are defined, controller will configure all of the load balancers with the specified attributes. These attributes cannot be overridden via ingress annotations.
  • Currently supported Load balancer attributes are listed in the AWS documentation.
  • In case of the conflict attributes values for the Ingresses under the same ingress group, the controller will fail to reconcile.

Tests

  1. Added unit tests.
  2. Created IngressClass, IngressClassParams and Ingresses, verified the following circumstances:
  • If both IngressClassParams and Ingress have the same attribute keys, but different attribute values, the controller will use the value from IngressClassParams to build the load balancers;
  • If the attributes are only specified in IngressClassParams, the controller will configure the attributes to all the ALBs of the IngressClass;
  • If there are conflicting attributes values for the Ingresses under the same ingress group, the controller will fail to reconcile.

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 23, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @oliviassss. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 23, 2021
@kishorj
Copy link
Collaborator

kishorj commented Aug 25, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 25, 2021
@oliviassss oliviassss closed this Aug 25, 2021
@oliviassss oliviassss deleted the IngressClassParams_attribues_support branch August 25, 2021 21:58
@oliviassss oliviassss restored the IngressClassParams_attribues_support branch August 25, 2021 23:22
@oliviassss oliviassss reopened this Aug 25, 2021
@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2021

Codecov Report

Merging #2190 (d580df9) into main (a789f51) will increase coverage by 0.06%.
The diff coverage is 64.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2190      +/-   ##
==========================================
+ Coverage   52.29%   52.36%   +0.06%     
==========================================
  Files         132      133       +1     
  Lines        7234     7253      +19     
==========================================
+ Hits         3783     3798      +15     
- Misses       3157     3158       +1     
- Partials      294      297       +3     
Impacted Files Coverage Δ
pkg/deploy/elbv2/load_balancer_synthesizer.go 41.37% <0.00%> (ø)
pkg/ingress/model_build_load_balancer.go 51.54% <50.00%> (+0.45%) ⬆️
...kg/ingress/model_build_load_balancer_attributes.go 69.56% <69.56%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a789f51...d580df9. Read the comment docs.

@oliviassss oliviassss force-pushed the IngressClassParams_attribues_support branch from f452eeb to d580df9 Compare August 26, 2021 04:09
@kishorj kishorj added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 26, 2021
@oliviassss
Copy link
Collaborator Author

/retest

@kishorj
Copy link
Collaborator

kishorj commented Aug 26, 2021

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 26, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kishorj, oliviassss

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 26, 2021
@k8s-ci-robot k8s-ci-robot merged commit 3c75edb into kubernetes-sigs:main Aug 26, 2021
@oliviassss oliviassss deleted the IngressClassParams_attribues_support branch September 14, 2021 21:22
@stevehipwell
Copy link
Contributor

Is there a timeframe for when this is likely to be released?

Timothy-Dougherty pushed a commit to adammw/aws-load-balancer-controller that referenced this pull request Nov 9, 2023
…es-sigs#2190)

* add load balancer attributes support for IngressClassParams

* format
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants