Skip to content

Conversation

@bnutt
Copy link
Contributor

@bnutt bnutt commented Aug 26, 2021

Issue

Description

AWS only allows loadbalancer names with a length up to 32 characters, this change trims the length of the provided value when a custom load balancer name is provided.

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

Hi @bnutt. 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 26, 2021
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 26, 2021
@kishorj
Copy link
Contributor

kishorj commented Aug 26, 2021

@bnutt, thanks a bunch for your contribution. Would you be able contribute similar changes to the ALB as well?

@bnutt
Copy link
Contributor Author

bnutt commented Aug 26, 2021

@bnutt, thanks a bunch for your contribution. Would you be able contribute similar changes to the ALB as well?

@kishorj Done in the commit 6e65632!

@kishorj
Copy link
Contributor

kishorj commented Aug 26, 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 26, 2021
@kishorj kishorj added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 26, 2021
@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2021

Codecov Report

Merging #2195 (08277aa) into main (3c75edb) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@ ## main #2195 +/- ## ========================================== + Coverage 52.36% 52.39% +0.02%  ========================================== Files 133 133 Lines 7253 7257 +4 ========================================== + Hits 3798 3802 +4  Misses 3158 3158 Partials 297 297 
Impacted Files Coverage Δ
pkg/ingress/model_build_load_balancer.go 51.96% <100.00%> (+0.42%) ⬆️
pkg/service/model_build_load_balancer.go 83.33% <100.00%> (+0.15%) ⬆️

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 3c75edb...08277aa. Read the comment docs.

@bnutt
Copy link
Contributor Author

bnutt commented Aug 26, 2021

/retest

@bnutt
Copy link
Contributor Author

bnutt commented Aug 27, 2021

@kishorj I am not entirely sure if e2e tests are failing because of my changes or if it's environment related, do you have any pointers?

@kishorj
Copy link
Contributor

kishorj commented Aug 27, 2021

/retest

@kishorj
Copy link
Contributor

kishorj commented Aug 27, 2021

@kishorj I am not entirely sure if e2e tests are failing because of my changes or if it's environment related, do you have any pointers?

doesn't look related to your changes. I will look into it if it fails again. Could you also rebase the PR to get the recent changes?

bnutt added 2 commits August 27, 2021 09:46
AWS only allows loadbalancer names with a length up to 32 characters, this change trims the length of the provided value when a custom load balancer name is provided.
@bnutt bnutt force-pushed the validate-custom-name-length branch from 6e65632 to 08277aa Compare August 27, 2021 16:46
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 27, 2021
@bnutt
Copy link
Contributor Author

bnutt commented Aug 27, 2021

@kishorj I am not entirely sure if e2e tests are failing because of my changes or if it's environment related, do you have any pointers?

doesn't look related to your changes. I will look into it if it fails again. Could you also rebase the PR to get the recent changes?

Done.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 28, 2021
@kishorj
Copy link
Contributor

kishorj commented Aug 28, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2021
@k8s-ci-robot k8s-ci-robot merged commit eb042f3 into kubernetes-sigs:main Aug 28, 2021
@bnutt bnutt deleted the validate-custom-name-length branch August 28, 2021 01:09
@M00nF1sh
Copy link
Member

I think we should change this logic

we shouldn't trim the LB name silently if it exceeds 32.
instead, we should validate that it matches the regex & within 32 character and error out if validation fails.

@kishorj
Copy link
Contributor

kishorj commented Oct 14, 2021

I think we should change this logic

we shouldn't trim the LB name silently if it exceeds 32. instead, we should validate that it matches the regex & within 32 character and error out if validation fails.

PR #2295

Timothy-Dougherty pushed a commit to adammw/aws-load-balancer-controller that referenced this pull request Nov 9, 2023
* Set maximum length for custom load-balancer-name AWS only allows loadbalancer names with a length up to 32 characters, this change trims the length of the provided value when a custom load balancer name is provided. * Trim length for custom lb name for ALBs
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/M Denotes a PR that changes 30-99 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

5 participants